OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_H_ | 5 #ifndef CC_TEST_FAKE_PICTURE_PILE_H_ |
6 #define CC_TEST_FAKE_PICTURE_PILE_H_ | 6 #define CC_TEST_FAKE_PICTURE_PILE_H_ |
7 | 7 |
8 #include "cc/resources/picture_pile.h" | 8 #include "cc/resources/picture_pile.h" |
9 #include "cc/test/fake_content_layer_client.h" | 9 #include "cc/test/fake_content_layer_client.h" |
10 #include "cc/test/impl_side_painting_settings.h" | 10 #include "cc/test/impl_side_painting_settings.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 client_.add_draw_bitmap(bitmap, point, paint); | 97 client_.add_draw_bitmap(bitmap, point, paint); |
98 } | 98 } |
99 | 99 |
100 void set_default_paint(const SkPaint& paint) { default_paint_ = paint; } | 100 void set_default_paint(const SkPaint& paint) { default_paint_ = paint; } |
101 | 101 |
102 void AddRecordingAt(int x, int y); | 102 void AddRecordingAt(int x, int y); |
103 void RemoveRecordingAt(int x, int y); | 103 void RemoveRecordingAt(int x, int y); |
104 bool HasRecordingAt(int x, int y) const; | 104 bool HasRecordingAt(int x, int y) const; |
105 int num_tiles_x() const { return tiling_.num_tiles_x(); } | 105 int num_tiles_x() const { return tiling_.num_tiles_x(); } |
106 int num_tiles_y() const { return tiling_.num_tiles_y(); } | 106 int num_tiles_y() const { return tiling_.num_tiles_y(); } |
107 void RerecordPile(); | 107 void Rerecord(); |
108 | 108 |
109 private: | 109 private: |
110 base::WaitableEvent* playback_allowed_event_; | 110 base::WaitableEvent* playback_allowed_event_; |
111 | 111 |
112 FakeContentLayerClient client_; | 112 FakeContentLayerClient client_; |
113 SkPaint default_paint_; | 113 SkPaint default_paint_; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace cc | 116 } // namespace cc |
117 | 117 |
118 #endif // CC_TEST_FAKE_PICTURE_PILE_H_ | 118 #endif // CC_TEST_FAKE_PICTURE_PILE_H_ |
OLD | NEW |