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

Unified Diff: cc/scoped_texture_unittest.cc

Issue 11150025: Patch from https://codereview.chromium.org/11111005/ without actual file deletes (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
« no previous file with comments | « cc/scoped_texture.cc ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scoped_texture_unittest.cc
diff --git a/cc/scoped_texture_unittest.cc b/cc/scoped_texture_unittest.cc
index b707a7fcb153878a422444a39696627f0e56a810..f0447c493e45d35e6e46d669ab523dd428ad3a2e 100644
--- a/cc/scoped_texture_unittest.cc
+++ b/cc/scoped_texture_unittest.cc
@@ -6,12 +6,12 @@
#include "CCScopedTexture.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/khronos/GLES2/gl2.h"
#include "CCRenderer.h"
#include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread
#include "CCTiledLayerTestCommon.h"
#include "FakeCCGraphicsContext.h"
-#include "GraphicsContext3D.h"
-#include "testing/gtest/include/gtest/gtest.h"
using namespace cc;
using namespace WebKit;
@@ -40,14 +40,14 @@ TEST(CCScopedTextureTest, CreateScopedTexture)
DebugScopedSetImplThread implThread;
OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get()));
OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GL_RGBA, CCResourceProvider::TextureUsageAny);
// The texture has an allocated byte-size now.
size_t expectedBytes = 30 * 30 * 4;
EXPECT_EQ(expectedBytes, texture->bytes());
EXPECT_LT(0u, texture->id());
- EXPECT_EQ(GraphicsContext3D::RGBA, texture->format());
+ EXPECT_EQ(GL_RGBA, texture->format());
EXPECT_EQ(IntSize(30, 30), texture->size());
}
@@ -61,7 +61,7 @@ TEST(CCScopedTextureTest, ScopedTextureIsDeleted)
OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GL_RGBA, CCResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
}
@@ -71,7 +71,7 @@ TEST(CCScopedTextureTest, ScopedTextureIsDeleted)
{
OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GL_RGBA, CCResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
texture->free();
@@ -89,7 +89,7 @@ TEST(CCScopedTextureTest, LeakScopedTexture)
OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get());
EXPECT_EQ(0u, resourceProvider->numResources());
- texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny);
+ texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GL_RGBA, CCResourceProvider::TextureUsageAny);
EXPECT_LT(0u, texture->id());
EXPECT_EQ(1u, resourceProvider->numResources());
« no previous file with comments | « cc/scoped_texture.cc ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698