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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void InitializeSettings(LayerTreeSettings* settings) override { | 64 void InitializeSettings(LayerTreeSettings* settings) override { |
65 settings->force_antialiasing = force_antialiasing_; | 65 settings->renderer_settings.force_antialiasing = force_antialiasing_; |
66 settings->force_blending_with_shaders = force_blending_with_shaders_; | 66 settings->renderer_settings.force_blending_with_shaders = |
| 67 force_blending_with_shaders_; |
67 } | 68 } |
68 | 69 |
69 protected: | 70 protected: |
70 void RunBlendingWithRootPixelTestType(PixelTestType type) { | 71 void RunBlendingWithRootPixelTestType(PixelTestType type) { |
71 const int kLaneWidth = 2; | 72 const int kLaneWidth = 2; |
72 const int kLaneHeight = kLaneWidth; | 73 const int kLaneHeight = kLaneWidth; |
73 const int kRootWidth = (kBlendModesCount + 2) * kLaneWidth; | 74 const int kRootWidth = (kBlendModesCount + 2) * kLaneWidth; |
74 const int kRootHeight = 2 * kLaneWidth + kLaneHeight; | 75 const int kRootHeight = 2 * kLaneWidth + kLaneHeight; |
75 | 76 |
76 scoped_refptr<SolidColorLayer> background = | 77 scoped_refptr<SolidColorLayer> background = |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 BlendingWithRenderPassShadersWithMaskColorMatrixAA_GL) { | 468 BlendingWithRenderPassShadersWithMaskColorMatrixAA_GL) { |
468 RunBlendingWithRenderPass( | 469 RunBlendingWithRenderPass( |
469 PIXEL_TEST_GL, FILE_PATH_LITERAL("blending_render_pass_mask.png"), | 470 PIXEL_TEST_GL, FILE_PATH_LITERAL("blending_render_pass_mask.png"), |
470 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); | 471 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); |
471 } | 472 } |
472 | 473 |
473 } // namespace | 474 } // namespace |
474 } // namespace cc | 475 } // namespace cc |
475 | 476 |
476 #endif // OS_ANDROID | 477 #endif // OS_ANDROID |
OLD | NEW |