[core] move BackendScope to gfx namespace

This commit is contained in:
Konstantin Käfer
2019-04-01 15:57:44 +02:00
parent 865f8a6c03
commit a782a6d15b
30 changed files with 68 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
#include <mbgl/test/util.hpp>
#include <mbgl/renderer/renderer_backend.hpp>
#include <mbgl/renderer/backend_scope.hpp>
#include <mbgl/gfx/backend_scope.hpp>
#include <functional>
@@ -49,7 +49,7 @@ TEST(BackendScope, SingleScope) {
backend.deactivateFunction = [&] { deactivated = true; };
{
BackendScope test { backend };
gfx::BackendScope test { backend };
}
ASSERT_TRUE(activated);
@@ -67,10 +67,10 @@ TEST(BackendScope, NestedScopes) {
backend.deactivateFunction = [&] { deactivated++; };
{
BackendScope outer { backend };
gfx::BackendScope outer { backend };
ASSERT_EQ(1, activated);
{
BackendScope inner { backend };
gfx::BackendScope inner { backend };
ASSERT_EQ(1, activated);
}
ASSERT_EQ(0, deactivated);
@@ -96,10 +96,10 @@ TEST(BackendScope, ChainedScopes) {
backendB.deactivateFunction = [&] { activatedB = false; };
{
BackendScope scopeA { backendA };
gfx::BackendScope scopeA { backendA };
ASSERT_TRUE(activatedA);
{
BackendScope scopeB { backendB };
gfx::BackendScope scopeB { backendB };
ASSERT_FALSE(activatedA);
ASSERT_TRUE(activatedB);
}