OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include "cc/layers/append_quads_data.h" | 7 #include "cc/layers/append_quads_data.h" |
8 #include "cc/quads/draw_quad.h" | 8 #include "cc/quads/draw_quad.h" |
9 #include "cc/test/pixel_test.h" | 9 #include "cc/test/pixel_test.h" |
10 #include "third_party/skia/include/core/SkImageFilter.h" | 10 #include "third_party/skia/include/core/SkImageFilter.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 DrawFrame(); | 475 DrawFrame(); |
476 EXPECT_TRUE(PixelsMatchReference( | 476 EXPECT_TRUE(PixelsMatchReference( |
477 base::FilePath(FILE_PATH_LITERAL("background_filter.png")), | 477 base::FilePath(FILE_PATH_LITERAL("background_filter.png")), |
478 ExactPixelComparator(true))); | 478 ExactPixelComparator(true))); |
479 } | 479 } |
480 | 480 |
481 TEST_F(GLRendererPixelTest, AntiAliasing) { | 481 TEST_F(GLRendererPixelTest, AntiAliasing) { |
482 gfx::Rect rect(0, 0, 200, 200); | 482 gfx::Rect rect(0, 0, 200, 200); |
483 | 483 |
484 RenderPass::Id id(1, 1); | 484 RenderPass::Id id(1, 1); |
485 gfx::Transform transform_to_root; | 485 scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); |
486 scoped_ptr<RenderPass> pass = | |
487 CreateTestRenderPass(id, rect, transform_to_root); | |
488 | 486 |
489 gfx::Transform red_content_to_target_transform; | 487 gfx::Transform red_content_to_target_transform; |
490 red_content_to_target_transform.Rotate(10); | 488 red_content_to_target_transform.Rotate(10); |
491 scoped_ptr<SharedQuadState> red_shared_state = | 489 scoped_ptr<SharedQuadState> red_shared_state = |
492 CreateTestSharedQuadState(red_content_to_target_transform, rect); | 490 CreateTestSharedQuadState(red_content_to_target_transform, rect); |
493 | 491 |
494 scoped_ptr<SolidColorDrawQuad> red = SolidColorDrawQuad::Create(); | 492 scoped_ptr<SolidColorDrawQuad> red = SolidColorDrawQuad::Create(); |
495 red->SetNew(red_shared_state.get(), rect, SK_ColorRED); | 493 red->SetNew(red_shared_state.get(), rect, SK_ColorRED); |
496 | 494 |
497 pass->quad_list.push_back(red.PassAs<DrawQuad>()); | 495 pass->quad_list.push_back(red.PassAs<DrawQuad>()); |
(...skipping 23 matching lines...) Expand all Loading... |
521 renderer_->DrawFrame(&pass_list); | 519 renderer_->DrawFrame(&pass_list); |
522 | 520 |
523 EXPECT_TRUE(PixelsMatchReference( | 521 EXPECT_TRUE(PixelsMatchReference( |
524 base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")), | 522 base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")), |
525 ExactPixelComparator(true))); | 523 ExactPixelComparator(true))); |
526 } | 524 } |
527 #endif | 525 #endif |
528 | 526 |
529 } // namespace | 527 } // namespace |
530 } // namespace cc | 528 } // namespace cc |
OLD | NEW |