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 void PaintContentsToDisplayList( | 43 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( |
44 DisplayItemList* display_list, | |
45 const gfx::Rect& clip, | 44 const gfx::Rect& clip, |
46 PaintingControlSetting painting_control) override; | 45 PaintingControlSetting painting_control) override; |
47 bool FillsBoundsCompletely() const override; | 46 bool FillsBoundsCompletely() const override; |
48 | 47 |
49 void set_fill_with_nonsolid_color(bool nonsolid) { | 48 void set_fill_with_nonsolid_color(bool nonsolid) { |
50 fill_with_nonsolid_color_ = nonsolid; | 49 fill_with_nonsolid_color_ = nonsolid; |
51 } | 50 } |
52 | 51 |
53 void add_draw_rect(const gfx::RectF& rect, const SkPaint& paint) { | 52 void add_draw_rect(const gfx::RectF& rect, const SkPaint& paint) { |
54 draw_rects_.push_back(std::make_pair(rect, paint)); | 53 draw_rects_.push_back(std::make_pair(rect, paint)); |
(...skipping 26 matching lines...) Expand all Loading... |
81 bool fill_with_nonsolid_color_; | 80 bool fill_with_nonsolid_color_; |
82 RectPaintVector draw_rects_; | 81 RectPaintVector draw_rects_; |
83 BitmapVector draw_bitmaps_; | 82 BitmapVector draw_bitmaps_; |
84 SkCanvas* last_canvas_; | 83 SkCanvas* last_canvas_; |
85 PaintingControlSetting last_painting_control_; | 84 PaintingControlSetting last_painting_control_; |
86 }; | 85 }; |
87 | 86 |
88 } // namespace cc | 87 } // namespace cc |
89 | 88 |
90 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ | 89 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ |
OLD | NEW |