OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_CONTENT_LAYER_CLIENT_H_ | 5 #ifndef CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ |
6 #define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ | 6 #define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 gfx::Transform transform; | 33 gfx::Transform transform; |
34 SkPaint paint; | 34 SkPaint paint; |
35 }; | 35 }; |
36 | 36 |
37 FakeContentLayerClient(); | 37 FakeContentLayerClient(); |
38 ~FakeContentLayerClient() override; | 38 ~FakeContentLayerClient() override; |
39 | 39 |
40 void PaintContents(SkCanvas* canvas, | 40 void PaintContents(SkCanvas* canvas, |
41 const gfx::Rect& rect, | 41 const gfx::Rect& rect, |
42 PaintingControlSetting painting_control) override; | 42 PaintingControlSetting painting_control) override; |
43 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( | 43 void PaintContentsToDisplayList( |
| 44 DisplayItemList* display_list, |
44 const gfx::Rect& clip, | 45 const gfx::Rect& clip, |
45 PaintingControlSetting painting_control) override; | 46 PaintingControlSetting painting_control) override; |
46 bool FillsBoundsCompletely() const override; | 47 bool FillsBoundsCompletely() const override; |
47 | 48 |
48 void set_fill_with_nonsolid_color(bool nonsolid) { | 49 void set_fill_with_nonsolid_color(bool nonsolid) { |
49 fill_with_nonsolid_color_ = nonsolid; | 50 fill_with_nonsolid_color_ = nonsolid; |
50 } | 51 } |
51 | 52 |
52 void add_draw_rect(const gfx::RectF& rect, const SkPaint& paint) { | 53 void add_draw_rect(const gfx::RectF& rect, const SkPaint& paint) { |
53 draw_rects_.push_back(std::make_pair(rect, paint)); | 54 draw_rects_.push_back(std::make_pair(rect, paint)); |
(...skipping 26 matching lines...) Expand all Loading... |
80 bool fill_with_nonsolid_color_; | 81 bool fill_with_nonsolid_color_; |
81 RectPaintVector draw_rects_; | 82 RectPaintVector draw_rects_; |
82 BitmapVector draw_bitmaps_; | 83 BitmapVector draw_bitmaps_; |
83 SkCanvas* last_canvas_; | 84 SkCanvas* last_canvas_; |
84 PaintingControlSetting last_painting_control_; | 85 PaintingControlSetting last_painting_control_; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace cc | 88 } // namespace cc |
88 | 89 |
89 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ | 90 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ |
OLD | NEW |