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 <stdint.h> |
| 6 |
5 #include "cc/layers/picture_image_layer.h" | 7 #include "cc/layers/picture_image_layer.h" |
6 #include "cc/layers/solid_color_layer.h" | 8 #include "cc/layers/solid_color_layer.h" |
7 #include "cc/test/layer_tree_pixel_resource_test.h" | 9 #include "cc/test/layer_tree_pixel_resource_test.h" |
8 #include "cc/test/pixel_comparator.h" | 10 #include "cc/test/pixel_comparator.h" |
9 #include "third_party/skia/include/core/SkImage.h" | 11 #include "third_party/skia/include/core/SkImage.h" |
10 #include "third_party/skia/include/core/SkSurface.h" | 12 #include "third_party/skia/include/core/SkSurface.h" |
11 | 13 |
12 #if !defined(OS_ANDROID) | 14 #if !defined(OS_ANDROID) |
13 | 15 |
14 namespace cc { | 16 namespace cc { |
(...skipping 28 matching lines...) Expand all Loading... |
43 0xff808080, // gray | 45 0xff808080, // gray |
44 0x80000000, // black with transparency | 46 0x80000000, // black with transparency |
45 0xffffffff, // white | 47 0xffffffff, // white |
46 0x80ffffff, // white with transparency | 48 0x80ffffff, // white with transparency |
47 0x00000000 // transparent | 49 0x00000000 // transparent |
48 }; | 50 }; |
49 | 51 |
50 const int kBlendModesCount = arraysize(kBlendModes); | 52 const int kBlendModesCount = arraysize(kBlendModes); |
51 const int kCSSTestColorsCount = arraysize(kCSSTestColors); | 53 const int kCSSTestColorsCount = arraysize(kCSSTestColors); |
52 | 54 |
53 using RenderPassOptions = uint32; | 55 using RenderPassOptions = uint32_t; |
54 const uint32 kUseMasks = 1 << 0; | 56 const uint32_t kUseMasks = 1 << 0; |
55 const uint32 kUseAntialiasing = 1 << 1; | 57 const uint32_t kUseAntialiasing = 1 << 1; |
56 const uint32 kUseColorMatrix = 1 << 2; | 58 const uint32_t kUseColorMatrix = 1 << 2; |
57 const uint32 kForceShaders = 1 << 3; | 59 const uint32_t kForceShaders = 1 << 3; |
58 | 60 |
59 class LayerTreeHostBlendingPixelTest : public LayerTreeHostPixelResourceTest { | 61 class LayerTreeHostBlendingPixelTest : public LayerTreeHostPixelResourceTest { |
60 public: | 62 public: |
61 LayerTreeHostBlendingPixelTest() | 63 LayerTreeHostBlendingPixelTest() |
62 : force_antialiasing_(false), force_blending_with_shaders_(false) { | 64 : force_antialiasing_(false), force_blending_with_shaders_(false) { |
63 pixel_comparator_.reset(new FuzzyPixelOffByOneComparator(true)); | 65 pixel_comparator_.reset(new FuzzyPixelOffByOneComparator(true)); |
64 } | 66 } |
65 | 67 |
66 void InitializeSettings(LayerTreeSettings* settings) override { | 68 void InitializeSettings(LayerTreeSettings* settings) override { |
67 settings->renderer_settings.force_antialiasing = force_antialiasing_; | 69 settings->renderer_settings.force_antialiasing = force_antialiasing_; |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 RunBlendingWithRenderPass( | 498 RunBlendingWithRenderPass( |
497 GL_ZERO_COPY_RECT_DRAW, | 499 GL_ZERO_COPY_RECT_DRAW, |
498 FILE_PATH_LITERAL("blending_render_pass_mask.png"), | 500 FILE_PATH_LITERAL("blending_render_pass_mask.png"), |
499 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); | 501 kUseMasks | kUseAntialiasing | kUseColorMatrix | kForceShaders); |
500 } | 502 } |
501 | 503 |
502 } // namespace | 504 } // namespace |
503 } // namespace cc | 505 } // namespace cc |
504 | 506 |
505 #endif // OS_ANDROID | 507 #endif // OS_ANDROID |
OLD | NEW |