| 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/append_quads_data.h" | 5 #include "cc/layers/append_quads_data.h" |
| 6 #include "cc/layers/content_layer_client.h" | 6 #include "cc/layers/content_layer_client.h" |
| 7 #include "cc/layers/picture_layer.h" | 7 #include "cc/layers/picture_layer.h" |
| 8 #include "cc/layers/picture_layer_impl.h" | 8 #include "cc/layers/picture_layer_impl.h" |
| 9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
| 10 #include "cc/test/layer_tree_pixel_test.h" | 10 #include "cc/test/layer_tree_pixel_test.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 class BlueYellowLayerClient : public ContentLayerClient { | 59 class BlueYellowLayerClient : public ContentLayerClient { |
| 60 public: | 60 public: |
| 61 explicit BlueYellowLayerClient(gfx::Rect layer_rect) | 61 explicit BlueYellowLayerClient(gfx::Rect layer_rect) |
| 62 : layer_rect_(layer_rect) {} | 62 : layer_rect_(layer_rect) {} |
| 63 | 63 |
| 64 virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } | 64 virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } |
| 65 | 65 |
| 66 virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } | 66 virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } |
| 67 | 67 |
| 68 virtual void PaintContents(SkCanvas* canvas, | 68 virtual void PaintContents( |
| 69 const gfx::Rect& clip, | 69 SkCanvas* canvas, |
| 70 gfx::RectF* opaque) OVERRIDE { | 70 const gfx::Rect& clip, |
| 71 gfx::RectF* opaque, |
| 72 ContentLayerClient::GraphicsContextStatus) OVERRIDE { |
| 71 *opaque = gfx::RectF(layer_rect_.width(), layer_rect_.height()); | 73 *opaque = gfx::RectF(layer_rect_.width(), layer_rect_.height()); |
| 72 | 74 |
| 73 SkPaint paint; | 75 SkPaint paint; |
| 74 paint.setColor(SK_ColorBLUE); | 76 paint.setColor(SK_ColorBLUE); |
| 75 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), | 77 canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), |
| 76 layer_rect_.height() / 2), | 78 layer_rect_.height() / 2), |
| 77 paint); | 79 paint); |
| 78 | 80 |
| 79 paint.setColor(SK_ColorYELLOW); | 81 paint.setColor(SK_ColorYELLOW); |
| 80 canvas->drawRect( | 82 canvas->drawRect( |
| (...skipping 22 matching lines...) Expand all Loading... |
| 103 | 105 |
| 104 RunPixelTest(GL_WITH_BITMAP, | 106 RunPixelTest(GL_WITH_BITMAP, |
| 105 layer, | 107 layer, |
| 106 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png"))); | 108 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png"))); |
| 107 } | 109 } |
| 108 | 110 |
| 109 } // namespace | 111 } // namespace |
| 110 } // namespace cc | 112 } // namespace cc |
| 111 | 113 |
| 112 #endif // OS_ANDROID | 114 #endif // OS_ANDROID |
| OLD | NEW |