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 13 matching lines...) Expand all Loading... |
24 TilingData& tiling() { return tiling_; } | 24 TilingData& tiling() { return tiling_; } |
25 | 25 |
26 void AddRecordingAt(int x, int y); | 26 void AddRecordingAt(int x, int y); |
27 | 27 |
28 void RemoveRecordingAt(int x, int y); | 28 void RemoveRecordingAt(int x, int y); |
29 | 29 |
30 void add_draw_rect(const gfx::Rect& rect) { | 30 void add_draw_rect(const gfx::Rect& rect) { |
31 client_.add_draw_rect(rect, default_paint_); | 31 client_.add_draw_rect(rect, default_paint_); |
32 } | 32 } |
33 | 33 |
| 34 void add_draw_bitmap(const SkBitmap& bitmap, gfx::Point point) { |
| 35 client_.add_draw_bitmap(bitmap, point); |
| 36 } |
| 37 |
34 void add_draw_rect_with_paint(gfx::Rect rect, const SkPaint& paint) { | 38 void add_draw_rect_with_paint(gfx::Rect rect, const SkPaint& paint) { |
35 client_.add_draw_rect(rect, paint); | 39 client_.add_draw_rect(rect, paint); |
36 } | 40 } |
37 | 41 |
38 void set_default_paint(const SkPaint& paint) { | 42 void set_default_paint(const SkPaint& paint) { |
39 default_paint_ = paint; | 43 default_paint_ = paint; |
40 } | 44 } |
41 | 45 |
42 protected: | 46 protected: |
43 FakePicturePileImpl(); | 47 FakePicturePileImpl(); |
44 virtual ~FakePicturePileImpl(); | 48 virtual ~FakePicturePileImpl(); |
45 | 49 |
46 FakeContentLayerClient client_; | 50 FakeContentLayerClient client_; |
47 SkPaint default_paint_; | 51 SkPaint default_paint_; |
48 }; | 52 }; |
49 | 53 |
50 } // namespace cc | 54 } // namespace cc |
51 | 55 |
52 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 56 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
OLD | NEW |