Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: cc/test/fake_content_layer_client.h

Issue 1452353002: Turn off computation of the interest rect in cc in synchronized paint mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 ~ImageData(); 31 ~ImageData();
32 skia::RefPtr<const SkImage> image; 32 skia::RefPtr<const SkImage> image;
33 gfx::Point point; 33 gfx::Point point;
34 gfx::Transform transform; 34 gfx::Transform transform;
35 SkPaint paint; 35 SkPaint paint;
36 }; 36 };
37 37
38 FakeContentLayerClient(); 38 FakeContentLayerClient();
39 ~FakeContentLayerClient() override; 39 ~FakeContentLayerClient() override;
40 40
41 gfx::Rect PaintableRegion() override;
41 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( 42 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
42 const gfx::Rect& clip, 43 const gfx::Rect& clip,
43 PaintingControlSetting painting_control) override; 44 PaintingControlSetting painting_control) override;
44 bool FillsBoundsCompletely() const override; 45 bool FillsBoundsCompletely() const override;
45 size_t GetApproximateUnsharedMemoryUsage() const override; 46 size_t GetApproximateUnsharedMemoryUsage() const override;
46 47
47 void set_fill_with_nonsolid_color(bool nonsolid) { 48 void set_fill_with_nonsolid_color(bool nonsolid) {
48 fill_with_nonsolid_color_ = nonsolid; 49 fill_with_nonsolid_color_ = nonsolid;
49 } 50 }
50 51
(...skipping 22 matching lines...) Expand all
73 SkCanvas* last_canvas() const { return last_canvas_; } 74 SkCanvas* last_canvas() const { return last_canvas_; }
74 75
75 PaintingControlSetting last_painting_control() const { 76 PaintingControlSetting last_painting_control() const {
76 return last_painting_control_; 77 return last_painting_control_;
77 } 78 }
78 79
79 void set_reported_memory_usage(size_t reported_memory_usage) { 80 void set_reported_memory_usage(size_t reported_memory_usage) {
80 reported_memory_usage_ = reported_memory_usage; 81 reported_memory_usage_ = reported_memory_usage;
81 } 82 }
82 83
84 void set_bounds(gfx::Size bounds) {
85 bounds_ = bounds;
86 bounds_set_ = true;
87 }
88
83 private: 89 private:
84 typedef std::vector<std::pair<gfx::RectF, SkPaint>> RectPaintVector; 90 typedef std::vector<std::pair<gfx::RectF, SkPaint>> RectPaintVector;
85 typedef std::vector<ImageData> ImageVector; 91 typedef std::vector<ImageData> ImageVector;
86 92
87 bool fill_with_nonsolid_color_; 93 bool fill_with_nonsolid_color_;
88 RectPaintVector draw_rects_; 94 RectPaintVector draw_rects_;
89 ImageVector draw_images_; 95 ImageVector draw_images_;
90 SkCanvas* last_canvas_; 96 SkCanvas* last_canvas_;
91 PaintingControlSetting last_painting_control_; 97 PaintingControlSetting last_painting_control_;
92 size_t reported_memory_usage_; 98 size_t reported_memory_usage_;
99 gfx::Size bounds_;
100 bool bounds_set_;
93 }; 101 };
94 102
95 } // namespace cc 103 } // namespace cc
96 104
97 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ 105 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/playback/display_list_recording_source_unittest.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698