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

Unified Diff: cc/output/renderer_pixeltest.cc

Issue 460563003: Fix interchange of red and blue content when using rgba_4444_textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « AUTHORS ('k') | cc/resources/platform_color.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/renderer_pixeltest.cc
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index f172da7e9eb1cd293ccb8fd469b643848ae6304d..07d046b92405e1b3df0f0408c2e8241793b0b49c 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -2122,6 +2122,48 @@ TYPED_TEST(RendererPixelTest, PictureDrawQuadNonIdentityScale) {
ExactPixelComparator(true)));
}
+TEST_F(GLRendererPixelTest, PictureDrawQuadTexture4444) {
USE eero AT chromium.org 2014/08/11 14:28:40 Done.
+ gfx::Size pile_tile_size(1000, 1000);
+ gfx::Rect viewport(this->device_viewport_size_);
+ ResourceFormat texture_format = RGBA_4444;
USE eero AT chromium.org 2014/08/11 14:28:40 No idea. I did not find any relevant function to b
enne (OOO) 2014/08/11 19:59:37 Really the question is if Mesa supports this. I a
USE eero AT chromium.org 2014/08/12 09:26:11 Unit tests seem to be using osmesa GL implementati
+
+ RenderPass::Id id(1, 1);
+ gfx::Transform transform_to_root;
+ scoped_ptr<RenderPass> pass =
+ CreateTestRenderPass(id, viewport, transform_to_root);
+
+ // One viewport-filling blue quad
+ scoped_refptr<FakePicturePileImpl> blue_pile =
+ FakePicturePileImpl::CreateFilledPile(pile_tile_size, viewport.size());
+ SkPaint blue_paint;
+ blue_paint.setColor(SK_ColorBLUE);
+ blue_pile->add_draw_rect_with_paint(viewport, blue_paint);
+ blue_pile->RerecordPile();
+
+ gfx::Transform blue_content_to_target_transform;
+ SharedQuadState* blue_shared_state = CreateTestSharedQuadState(
+ blue_content_to_target_transform, viewport, pass.get());
+
+ PictureDrawQuad* blue_quad = pass->CreateAndAppendDrawQuad<PictureDrawQuad>();
+ blue_quad->SetNew(blue_shared_state,
+ viewport,
+ gfx::Rect(),
+ viewport,
+ gfx::RectF(0.f, 0.f, 1.f, 1.f),
+ viewport.size(),
+ texture_format,
+ viewport,
+ 1.f,
+ PicturePileImpl::CreateFromOther(blue_pile));
+
+ RenderPassList pass_list;
+ pass_list.push_back(pass.Pass());
+
+ EXPECT_TRUE(this->RunPixelTest(&pass_list,
+ base::FilePath(FILE_PATH_LITERAL("blue.png")),
+ ExactPixelComparator(true)));
USE eero AT chromium.org 2014/08/11 14:28:40 Done. For that to work, I changed the blue compone
+}
+
TYPED_TEST(RendererPixelTest, WrapModeRepeat) {
gfx::Rect rect(this->device_viewport_size_);
« no previous file with comments | « AUTHORS ('k') | cc/resources/platform_color.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698