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 #ifndef CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/resources/picture_pile_impl.h" | 9 #include "cc/resources/picture_pile_impl.h" |
10 #include "cc/test/fake_content_layer_client.h" | 10 #include "cc/test/fake_content_layer_client.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 TilingData& tiling() { return tiling_; } | 31 TilingData& tiling() { return tiling_; } |
32 | 32 |
33 void AddRecordingAt(int x, int y); | 33 void AddRecordingAt(int x, int y); |
34 void RemoveRecordingAt(int x, int y); | 34 void RemoveRecordingAt(int x, int y); |
35 void RerecordPile(); | 35 void RerecordPile(); |
36 | 36 |
37 void add_draw_rect(const gfx::RectF& rect) { | 37 void add_draw_rect(const gfx::RectF& rect) { |
38 client_.add_draw_rect(rect, default_paint_); | 38 client_.add_draw_rect(rect, default_paint_); |
39 } | 39 } |
40 | 40 |
41 void add_draw_bitmap(const SkBitmap& bitmap, gfx::Point point) { | 41 void add_draw_bitmap(const SkBitmap& bitmap, const gfx::Point& point) { |
42 client_.add_draw_bitmap(bitmap, point, default_paint_); | 42 client_.add_draw_bitmap(bitmap, point, default_paint_); |
43 } | 43 } |
44 | 44 |
45 void add_draw_rect_with_paint(const gfx::RectF& rect, const SkPaint& paint) { | 45 void add_draw_rect_with_paint(const gfx::RectF& rect, const SkPaint& paint) { |
46 client_.add_draw_rect(rect, paint); | 46 client_.add_draw_rect(rect, paint); |
47 } | 47 } |
48 | 48 |
49 void add_draw_bitmap_with_paint(const SkBitmap& bitmap, | 49 void add_draw_bitmap_with_paint(const SkBitmap& bitmap, |
50 gfx::Point point, | 50 const gfx::Point& point, |
51 const SkPaint& paint) { | 51 const SkPaint& paint) { |
52 client_.add_draw_bitmap(bitmap, point, paint); | 52 client_.add_draw_bitmap(bitmap, point, paint); |
53 } | 53 } |
54 | 54 |
55 void set_default_paint(const SkPaint& paint) { | 55 void set_default_paint(const SkPaint& paint) { |
56 default_paint_ = paint; | 56 default_paint_ = paint; |
57 } | 57 } |
58 | 58 |
59 void set_background_color(SkColor color) { | 59 void set_background_color(SkColor color) { |
60 background_color_ = color; | 60 background_color_ = color; |
(...skipping 11 matching lines...) Expand all Loading... |
72 FakePicturePileImpl(); | 72 FakePicturePileImpl(); |
73 virtual ~FakePicturePileImpl(); | 73 virtual ~FakePicturePileImpl(); |
74 | 74 |
75 FakeContentLayerClient client_; | 75 FakeContentLayerClient client_; |
76 SkPaint default_paint_; | 76 SkPaint default_paint_; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace cc | 79 } // namespace cc |
80 | 80 |
81 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 81 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
OLD | NEW |