Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2019-01-18 17:03:07 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2019-03-01 10:45:24 +0300
commitf53013310a9ce31e976e7bae78461e57b12cc0d2 (patch)
treec4534e4209e7411771401542ccc82db631349190 /drape/drape_tests
parentc1375c8dac6c5d027d62f010042056b5cddd8c08 (diff)
[drape] Refactored context access in textures, fixed iOS compilation
Diffstat (limited to 'drape/drape_tests')
-rw-r--r--drape/drape_tests/font_texture_tests.cpp4
-rw-r--r--drape/drape_tests/texture_of_colors_tests.cpp14
2 files changed, 9 insertions, 9 deletions
diff --git a/drape/drape_tests/font_texture_tests.cpp b/drape/drape_tests/font_texture_tests.cpp
index 3bbdfb34c7..b6f9eca021 100644
--- a/drape/drape_tests/font_texture_tests.cpp
+++ b/drape/drape_tests/font_texture_tests.cpp
@@ -114,7 +114,7 @@ UNIT_TEST(UploadingGlyphs)
tex.Create(make_ref(&context), p);
EXPECTGL(glTexSubImage2D(_, _, _, _, _, _, _))
.WillRepeatedly(Invoke(&r, &UploadedRender::glMemoryToQImage));
- index.UploadResources(make_ref(&tex));
+ index.UploadResources(make_ref(&context), make_ref(&tex));
count = 0;
count += (index.MapResource(GlyphKey(0x68, GlyphManager::kDynamicGlyphSize)) != nullptr) ? 1 : 0;
@@ -128,7 +128,7 @@ UNIT_TEST(UploadingGlyphs)
EXPECTGL(glTexSubImage2D(_, _, _, _, _, _, _))
.WillRepeatedly(Invoke(&r, &UploadedRender::glMemoryToQImage));
- index.UploadResources(make_ref(&tex));
+ index.UploadResources(make_ref(&context), make_ref(&tex));
RunTestLoop("UploadingGlyphs", std::bind(&UploadedRender::Render, &r, _1));
DrapeRoutine::Shutdown();
diff --git a/drape/drape_tests/texture_of_colors_tests.cpp b/drape/drape_tests/texture_of_colors_tests.cpp
index 40667db35d..bf581f564e 100644
--- a/drape/drape_tests/texture_of_colors_tests.cpp
+++ b/drape/drape_tests/texture_of_colors_tests.cpp
@@ -104,7 +104,7 @@ UNIT_TEST(ColorPalleteUploadingSingleRow)
DummyTexture texture;
texture.Create(make_ref(&context), p);
DummyColorPallete cp(m2::PointU(width, height));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
{
cp.MapResource(dp::ColorKey(dp::Color(0xFF, 0, 0, 0)));
@@ -142,7 +142,7 @@ UNIT_TEST(ColorPalleteUploadingSingleRow)
EXPECTGL(glTexSubImage2D(0, 0, 10, 2, AnyOf(gl_const::GLRGBA, gl_const::GLRGBA8), gl_const::GL8BitOnChannel, _))
.WillOnce(Invoke(&cmp, &MemoryComparer::cmpSubImage));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
}
{
@@ -181,7 +181,7 @@ UNIT_TEST(ColorPalleteUploadingSingleRow)
EXPECTGL(glTexSubImage2D(10, 0, 10, 2, AnyOf(gl_const::GLRGBA, gl_const::GLRGBA8), gl_const::GL8BitOnChannel, _))
.WillOnce(Invoke(&cmp, &MemoryComparer::cmpSubImage));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
}
EXPECTGL(glDeleteTexture(1));
@@ -226,7 +226,7 @@ UNIT_TEST(ColorPalleteUploadingPartialyRow)
EXPECTGL(glTexSubImage2D(0, 0, 4, 2, AnyOf(gl_const::GLRGBA, gl_const::GLRGBA8), gl_const::GL8BitOnChannel, _))
.WillOnce(Invoke(&cmp, &MemoryComparer::cmpSubImage));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
}
{
@@ -269,7 +269,7 @@ UNIT_TEST(ColorPalleteUploadingPartialyRow)
EXPECTGL(glTexSubImage2D(0, 2, 4, 2, AnyOf(gl_const::GLRGBA, gl_const::GLRGBA8), gl_const::GL8BitOnChannel, _))
.WillOnce(Invoke(&cmp2, &MemoryComparer::cmpSubImage));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
}
@@ -316,7 +316,7 @@ UNIT_TEST(ColorPalleteUploadingMultiplyRow)
EXPECTGL(glTexSubImage2D(0, 0, 4, 2, AnyOf(gl_const::GLRGBA, gl_const::GLRGBA8), gl_const::GL8BitOnChannel, _))
.WillOnce(Invoke(&cmp, &MemoryComparer::cmpSubImage));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
}
{
@@ -352,7 +352,7 @@ UNIT_TEST(ColorPalleteUploadingMultiplyRow)
EXPECTGL(glTexSubImage2D(0, 2, 4, 4, AnyOf(gl_const::GLRGBA, gl_const::GLRGBA8), gl_const::GL8BitOnChannel, _))
.WillOnce(Invoke(&cmp1, &MemoryComparer::cmpSubImage));
- cp.UploadResources(make_ref(&texture));
+ cp.UploadResources(make_ref(&context), make_ref(&texture));
}
EXPECTGL(glDeleteTexture(1));