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 11 matching lines...) Expand all Loading... |
22 gfx::Size layer_bounds); | 22 gfx::Size layer_bounds); |
23 | 23 |
24 static scoped_refptr<FakePicturePileImpl> CreatePile(); | 24 static scoped_refptr<FakePicturePileImpl> CreatePile(); |
25 | 25 |
26 TilingData& tiling() { return tiling_; } | 26 TilingData& tiling() { return tiling_; } |
27 | 27 |
28 void AddRecordingAt(int x, int y); | 28 void AddRecordingAt(int x, int y); |
29 void RemoveRecordingAt(int x, int y); | 29 void RemoveRecordingAt(int x, int y); |
30 void RerecordPile(); | 30 void RerecordPile(); |
31 | 31 |
| 32 void AnalyzeInRect(gfx::Rect content_rect, |
| 33 float contents_scale, |
| 34 Analysis* analysis); |
| 35 |
32 void add_draw_rect(const gfx::RectF& rect) { | 36 void add_draw_rect(const gfx::RectF& rect) { |
33 client_.add_draw_rect(rect, default_paint_); | 37 client_.add_draw_rect(rect, default_paint_); |
34 } | 38 } |
35 | 39 |
36 void add_draw_bitmap(const SkBitmap& bitmap, gfx::Point point) { | 40 void add_draw_bitmap(const SkBitmap& bitmap, gfx::Point point) { |
37 client_.add_draw_bitmap(bitmap, point, default_paint_); | 41 client_.add_draw_bitmap(bitmap, point, default_paint_); |
38 } | 42 } |
39 | 43 |
40 void add_draw_rect_with_paint(const gfx::RectF& rect, const SkPaint& paint) { | 44 void add_draw_rect_with_paint(const gfx::RectF& rect, const SkPaint& paint) { |
41 client_.add_draw_rect(rect, paint); | 45 client_.add_draw_rect(rect, paint); |
(...skipping 25 matching lines...) Expand all Loading... |
67 FakePicturePileImpl(); | 71 FakePicturePileImpl(); |
68 virtual ~FakePicturePileImpl(); | 72 virtual ~FakePicturePileImpl(); |
69 | 73 |
70 FakeContentLayerClient client_; | 74 FakeContentLayerClient client_; |
71 SkPaint default_paint_; | 75 SkPaint default_paint_; |
72 }; | 76 }; |
73 | 77 |
74 } // namespace cc | 78 } // namespace cc |
75 | 79 |
76 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 80 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
OLD | NEW |