| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "cc/layers/content_layer_client.h" | 6 #include "cc/layers/content_layer_client.h" |
| 7 #include "cc/layers/picture_image_layer.h" | 7 #include "cc/layers/picture_image_layer.h" |
| 8 #include "cc/layers/picture_layer.h" | 8 #include "cc/layers/picture_layer.h" |
| 9 #include "cc/layers/solid_color_layer.h" | 9 #include "cc/layers/solid_color_layer.h" |
| 10 #include "cc/test/layer_tree_pixel_resource_test.h" | 10 #include "cc/test/layer_tree_pixel_resource_test.h" |
| 11 #include "cc/test/pixel_comparator.h" | 11 #include "cc/test/pixel_comparator.h" |
| 12 | 12 |
| 13 #if !defined(OS_ANDROID) | 13 #if !defined(OS_ANDROID) |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 typedef ParameterizedPixelResourceTest LayerTreeHostMasksPixelTest; | 18 typedef ParameterizedPixelResourceTest LayerTreeHostMasksPixelTest; |
| 19 | 19 |
| 20 INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(LayerTreeHostMasksPixelTest); | 20 INSTANTIATE_PIXEL_RESOURCE_TEST_CASE_P(LayerTreeHostMasksPixelTest); |
| 21 | 21 |
| 22 class MaskContentLayerClient : public ContentLayerClient { | 22 class MaskContentLayerClient : public ContentLayerClient { |
| 23 public: | 23 public: |
| 24 explicit MaskContentLayerClient(const gfx::Size& bounds) : bounds_(bounds) {} | 24 explicit MaskContentLayerClient(const gfx::Size& bounds) : bounds_(bounds) {} |
| 25 ~MaskContentLayerClient() override {} | 25 ~MaskContentLayerClient() override {} |
| 26 | 26 |
| 27 void DidChangeLayerCanUseLCDText() override {} |
| 28 |
| 27 bool FillsBoundsCompletely() const override { return false; } | 29 bool FillsBoundsCompletely() const override { return false; } |
| 28 | 30 |
| 29 void PaintContents( | 31 void PaintContents( |
| 30 SkCanvas* canvas, | 32 SkCanvas* canvas, |
| 31 const gfx::Rect& rect, | 33 const gfx::Rect& rect, |
| 32 ContentLayerClient::GraphicsContextStatus gc_status) override { | 34 ContentLayerClient::GraphicsContextStatus gc_status) override { |
| 33 SkPaint paint; | 35 SkPaint paint; |
| 34 paint.setStyle(SkPaint::kStroke_Style); | 36 paint.setStyle(SkPaint::kStroke_Style); |
| 35 paint.setStrokeWidth(SkIntToScalar(2)); | 37 paint.setStrokeWidth(SkIntToScalar(2)); |
| 36 paint.setColor(SK_ColorWHITE); | 38 paint.setColor(SK_ColorWHITE); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 271 |
| 270 RunPixelResourceTest(background, | 272 RunPixelResourceTest(background, |
| 271 base::FilePath(FILE_PATH_LITERAL( | 273 base::FilePath(FILE_PATH_LITERAL( |
| 272 "mask_of_replica_of_clipped_layer.png"))); | 274 "mask_of_replica_of_clipped_layer.png"))); |
| 273 } | 275 } |
| 274 | 276 |
| 275 } // namespace | 277 } // namespace |
| 276 } // namespace cc | 278 } // namespace cc |
| 277 | 279 |
| 278 #endif // OS_ANDROID | 280 #endif // OS_ANDROID |
| OLD | NEW |