Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: cc/scoped_texture_unittest.cc

Issue 11189043: cc: Rename cc classes and members to match filenames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/scoped_texture_unittest.cc
diff --git a/cc/scoped_texture_unittest.cc b/cc/scoped_texture_unittest.cc
index 44260ac2be0c3000f8c9d239e33f68a41f811354..cae694bfbe9b5b2df98edba73774e60c00cfa0dc 100644
--- a/cc/scoped_texture_unittest.cc
+++ b/cc/scoped_texture_unittest.cc
@@ -19,12 +19,12 @@ using namespace WebKitTests;
namespace {
-TEST(CCScopedTextureTest, NewScopedTexture)
+TEST(ScopedTextureTest, NewScopedTexture)
{
- scoped_ptr<CCGraphicsContext> context(createFakeCCGraphicsContext());
+ scoped_ptr<GraphicsContext> context(createFakeGraphicsContext());
DebugScopedSetImplThread implThread;
- scoped_ptr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get()));
- scoped_ptr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
+ scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::create(context.get()));
+ scoped_ptr<ScopedTexture> texture = ScopedTexture::create(resourceProvider.get());
// New scoped textures do not hold a texture yet.
EXPECT_EQ(0u, texture->id());
@@ -34,13 +34,13 @@ TEST(CCScopedTextureTest, NewScopedTexture)
EXPECT_EQ(0u, texture->bytes());
}
-TEST(CCScopedTextureTest, CreateScopedTexture)
+TEST(ScopedTextureTest, CreateScopedTexture)
{
- scoped_ptr<CCGraphicsContext> context(createFakeCCGraphicsContext());
+ scoped_ptr<GraphicsContext> context(createFakeGraphicsContext());
DebugScopedSetImplThread implThread;
- scoped_ptr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get()));
- scoped_ptr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::create(context.get()));
+ scoped_ptr<ScopedTexture> texture = ScopedTexture::create(resourceProvider.get());
+ texture->allocate(Renderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, ResourceProvider::TextureUsageAny);
// The texture has an allocated byte-size now.
size_t expectedBytes = 30 * 30 * 4;
@@ -51,17 +51,17 @@ TEST(CCScopedTextureTest, CreateScopedTexture)
EXPECT_EQ(IntSize(30, 30), texture->size());
}
-TEST(CCScopedTextureTest, ScopedTextureIsDeleted)
+TEST(ScopedTextureTest, ScopedTextureIsDeleted)
{
- scoped_ptr<CCGraphicsContext> context(createFakeCCGraphicsContext());
+ scoped_ptr<GraphicsContext> context(createFakeGraphicsContext());
DebugScopedSetImplThread implThread;
- scoped_ptr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get()));
+ scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::create(context.get()));
{
- scoped_ptr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
+ scoped_ptr<ScopedTexture> texture = ScopedTexture::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(Renderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, ResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
}
@@ -69,9 +69,9 @@ TEST(CCScopedTextureTest, ScopedTextureIsDeleted)
EXPECT_EQ(0u, resourceProvider->numResources());
{
- scoped_ptr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
+ scoped_ptr<ScopedTexture> texture = ScopedTexture::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(Renderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, ResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
texture->free();
@@ -79,17 +79,17 @@ TEST(CCScopedTextureTest, ScopedTextureIsDeleted)
}
}
-TEST(CCScopedTextureTest, LeakScopedTexture)
+TEST(ScopedTextureTest, LeakScopedTexture)
{
- scoped_ptr<CCGraphicsContext> context(createFakeCCGraphicsContext());
+ scoped_ptr<GraphicsContext> context(createFakeGraphicsContext());
DebugScopedSetImplThread implThread;
- scoped_ptr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get()));
+ scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::create(context.get()));
{
- scoped_ptr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
+ scoped_ptr<ScopedTexture> texture = ScopedTexture::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(Renderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, ResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
« cc/active_animation.h ('K') | « cc/scoped_texture.cc ('k') | cc/scoped_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698