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

Unified Diff: cc/output/renderer_pixeltest.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review feedback Created 7 years, 3 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/output/renderer_pixeltest.cc
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index daa503912bebda3f4bda3d1ffc7b383ed33c4c83..87823e6205211d175ea16787daa8404032778e75 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -111,9 +111,11 @@ scoped_ptr<TextureDrawQuad> CreateTestTextureDrawQuad(
SkColorGetB(texel_color));
std::vector<uint32_t> pixels(rect.size().GetArea(), pixel_color);
- ResourceProvider::ResourceId resource = resource_provider->CreateResource(
- rect.size(), GL_RGBA, GL_CLAMP_TO_EDGE,
- ResourceProvider::TextureUsageAny);
+ ResourceProvider::ResourceId resource =
+ resource_provider->CreateResource(rect.size(),
+ GL_CLAMP_TO_EDGE,
+ ResourceProvider::TextureUsageAny,
+ RGBA_8888);
resource_provider->SetPixels(
resource,
reinterpret_cast<uint8_t*>(&pixels.front()),
@@ -409,28 +411,28 @@ class VideoGLRendererPixelTest : public GLRendererPixelTest {
ResourceProvider::ResourceId y_resource =
resource_provider_->CreateResource(
this->device_viewport_size_,
- GL_LUMINANCE,
GL_CLAMP_TO_EDGE,
- ResourceProvider::TextureUsageAny);
+ ResourceProvider::TextureUsageAny,
+ LUMINANCE_8);
ResourceProvider::ResourceId u_resource =
resource_provider_->CreateResource(
this->device_viewport_size_,
- GL_LUMINANCE,
GL_CLAMP_TO_EDGE,
- ResourceProvider::TextureUsageAny);
+ ResourceProvider::TextureUsageAny,
+ LUMINANCE_8);
ResourceProvider::ResourceId v_resource =
resource_provider_->CreateResource(
this->device_viewport_size_,
- GL_LUMINANCE,
GL_CLAMP_TO_EDGE,
- ResourceProvider::TextureUsageAny);
+ ResourceProvider::TextureUsageAny,
+ LUMINANCE_8);
ResourceProvider::ResourceId a_resource = 0;
if (with_alpha) {
a_resource = resource_provider_->CreateResource(
this->device_viewport_size_,
- GL_LUMINANCE,
GL_CLAMP_TO_EDGE,
- ResourceProvider::TextureUsageAny);
+ ResourceProvider::TextureUsageAny,
+ LUMINANCE_8);
}
int w = this->device_viewport_size_.width();
@@ -1366,7 +1368,7 @@ TYPED_TEST(RendererPixelTestWithSkiaGPUBackend, PictureDrawQuadIdentityScale) {
gfx::Rect viewport(this->device_viewport_size_);
bool use_skia_gpu_backend = this->UseSkiaGPUBackend();
// TODO(enne): the renderer should figure this out on its own.
- bool contents_swizzled = !PlatformColor::SameComponentOrder(GL_RGBA);
+ bool contents_swizzled = !PlatformColor::SameComponentOrder(RGBA_8888);
RenderPass::Id id(1, 1);
gfx::Transform transform_to_root;
@@ -1451,7 +1453,7 @@ TYPED_TEST(RendererPixelTest, PictureDrawQuadOpacity) {
gfx::Size pile_tile_size(1000, 1000);
gfx::Rect viewport(this->device_viewport_size_);
bool use_skia_gpu_backend = this->UseSkiaGPUBackend();
- bool contents_swizzled = !PlatformColor::SameComponentOrder(GL_RGBA);
+ bool contents_swizzled = !PlatformColor::SameComponentOrder(RGBA_8888);
RenderPass::Id id(1, 1);
gfx::Transform transform_to_root;
@@ -1525,7 +1527,7 @@ TYPED_TEST(RendererPixelTestWithSkiaGPUBackend,
gfx::Rect viewport(this->device_viewport_size_);
bool use_skia_gpu_backend = this->UseSkiaGPUBackend();
// TODO(enne): the renderer should figure this out on its own.
- bool contents_swizzled = !PlatformColor::SameComponentOrder(GL_RGBA);
+ bool contents_swizzled = !PlatformColor::SameComponentOrder(RGBA_8888);
RenderPass::Id id(1, 1);
gfx::Transform transform_to_root;

Powered by Google App Engine
This is Rietveld 408576698