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

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

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
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | cc/test/fake_display_list_recording_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "cc/test/fake_content_layer_client.h" 5 #include "cc/test/fake_content_layer_client.h"
6 6
7 #include "cc/playback/clip_display_item.h" 7 #include "cc/playback/clip_display_item.h"
8 #include "cc/playback/display_item_list_settings.h" 8 #include "cc/playback/display_item_list_settings.h"
9 #include "cc/playback/drawing_display_item.h" 9 #include "cc/playback/drawing_display_item.h"
10 #include "cc/playback/transform_display_item.h" 10 #include "cc/playback/transform_display_item.h"
(...skipping 17 matching lines...) Expand all
28 28
29 FakeContentLayerClient::FakeContentLayerClient() 29 FakeContentLayerClient::FakeContentLayerClient()
30 : fill_with_nonsolid_color_(false), 30 : fill_with_nonsolid_color_(false),
31 last_canvas_(nullptr), 31 last_canvas_(nullptr),
32 last_painting_control_(PAINTING_BEHAVIOR_NORMAL), 32 last_painting_control_(PAINTING_BEHAVIOR_NORMAL),
33 reported_memory_usage_(0) {} 33 reported_memory_usage_(0) {}
34 34
35 FakeContentLayerClient::~FakeContentLayerClient() { 35 FakeContentLayerClient::~FakeContentLayerClient() {
36 } 36 }
37 37
38 gfx::Rect FakeContentLayerClient::PaintableRegion() {
39 CHECK(bounds_set_);
40 return gfx::Rect(bounds_);
41 }
42
38 scoped_refptr<DisplayItemList> 43 scoped_refptr<DisplayItemList>
39 FakeContentLayerClient::PaintContentsToDisplayList( 44 FakeContentLayerClient::PaintContentsToDisplayList(
40 const gfx::Rect& clip, 45 const gfx::Rect& clip,
41 PaintingControlSetting painting_control) { 46 PaintingControlSetting painting_control) {
42 // Cached picture is used because unit tests expect to be able to 47 // Cached picture is used because unit tests expect to be able to
43 // use GatherPixelRefs. 48 // use GatherPixelRefs.
44 DisplayItemListSettings settings; 49 DisplayItemListSettings settings;
45 settings.use_cached_picture = true; 50 settings.use_cached_picture = true;
46 scoped_refptr<DisplayItemList> display_list = 51 scoped_refptr<DisplayItemList> display_list =
47 DisplayItemList::Create(clip, settings); 52 DisplayItemList::Create(clip, settings);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return display_list; 108 return display_list;
104 } 109 }
105 110
106 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } 111 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; }
107 112
108 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { 113 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const {
109 return reported_memory_usage_; 114 return reported_memory_usage_;
110 } 115 }
111 116
112 } // namespace cc 117 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_content_layer_client.h ('k') | cc/test/fake_display_list_recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698