OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/image_layer.h" | 5 #include "cc/layers/image_layer.h" |
6 #include "cc/layers/solid_color_layer.h" | 6 #include "cc/layers/solid_color_layer.h" |
7 #include "cc/test/layer_tree_pixel_test.h" | 7 #include "cc/test/layer_tree_pixel_test.h" |
8 #include "cc/test/pixel_comparator.h" | 8 #include "cc/test/pixel_comparator.h" |
9 | 9 |
10 #if !defined(OS_ANDROID) | 10 #if !defined(OS_ANDROID) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const uint32 kUseColorMatrix = 1 << 2; | 54 const uint32 kUseColorMatrix = 1 << 2; |
55 const uint32 kForceShaders = 1 << 3; | 55 const uint32 kForceShaders = 1 << 3; |
56 | 56 |
57 class LayerTreeHostBlendingPixelTest : public LayerTreePixelTest { | 57 class LayerTreeHostBlendingPixelTest : public LayerTreePixelTest { |
58 public: | 58 public: |
59 LayerTreeHostBlendingPixelTest() | 59 LayerTreeHostBlendingPixelTest() |
60 : force_antialiasing_(false), force_blending_with_shaders_(false) { | 60 : force_antialiasing_(false), force_blending_with_shaders_(false) { |
61 pixel_comparator_.reset(new FuzzyPixelOffByOneComparator(true)); | 61 pixel_comparator_.reset(new FuzzyPixelOffByOneComparator(true)); |
62 } | 62 } |
63 | 63 |
64 virtual void InitializeSettings(LayerTreeSettings* settings) override { | 64 void InitializeSettings(LayerTreeSettings* settings) override { |
65 settings->force_antialiasing = force_antialiasing_; | 65 settings->force_antialiasing = force_antialiasing_; |
66 settings->force_blending_with_shaders = force_blending_with_shaders_; | 66 settings->force_blending_with_shaders = force_blending_with_shaders_; |
67 } | 67 } |
68 | 68 |
69 protected: | 69 protected: |
70 void RunBlendingWithRootPixelTestType(PixelTestType type) { | 70 void RunBlendingWithRootPixelTestType(PixelTestType type) { |
71 const int kLaneWidth = 2; | 71 const int kLaneWidth = 2; |
72 const int kLaneHeight = kLaneWidth; | 72 const int kLaneHeight = kLaneWidth; |
73 const int kRootWidth = (kBlendModesCount + 2) * kLaneWidth; | 73 const int kRootWidth = (kBlendModesCount + 2) * kLaneWidth; |
74 const int kRootHeight = 2 * kLaneWidth + kLaneHeight; | 74 const int kRootHeight = 2 * kLaneWidth + kLaneHeight; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 BlendingWithRenderPassShadersWithMaskColorMatrixAA_GL) { | 467 BlendingWithRenderPassShadersWithMaskColorMatrixAA_GL) { |
468 RunBlendingWithRenderPass( | 468 RunBlendingWithRenderPass( |
469 PIXEL_TEST_GL, FILE_PATH_LITERAL("blending_render_pass_mask.png"), | 469 PIXEL_TEST_GL, FILE_PATH_LITERAL("blending_render_pass_mask.png"), |
470 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); | 470 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); |
471 } | 471 } |
472 | 472 |
473 } // namespace | 473 } // namespace |
474 } // namespace cc | 474 } // namespace cc |
475 | 475 |
476 #endif // OS_ANDROID | 476 #endif // OS_ANDROID |
OLD | NEW |