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

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

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: rebase Created 3 years, 8 months 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_layer_tree_host_impl_client.cc ('k') | cc/test/test_layer_tree_host_base.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_RECORDING_SOURCE_H_ 5 #ifndef CC_TEST_FAKE_RECORDING_SOURCE_H_
6 #define CC_TEST_FAKE_RECORDING_SOURCE_H_ 6 #define CC_TEST_FAKE_RECORDING_SOURCE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 void SetLayerBounds(const gfx::Size& layer_bounds) { 58 void SetLayerBounds(const gfx::Size& layer_bounds) {
59 size_ = layer_bounds; 59 size_ = layer_bounds;
60 client_.set_bounds(layer_bounds); 60 client_.set_bounds(layer_bounds);
61 } 61 }
62 62
63 void SetClearCanvasWithDebugColor(bool clear) { 63 void SetClearCanvasWithDebugColor(bool clear) {
64 clear_canvas_with_debug_color_ = clear; 64 clear_canvas_with_debug_color_ = clear;
65 } 65 }
66 66
67 void set_fill_with_nonsolid_color(bool nonsolid) {
68 client_.set_fill_with_nonsolid_color(nonsolid);
69 }
70
67 void Rerecord() { 71 void Rerecord() {
68 SetNeedsDisplayRect(recorded_viewport_); 72 SetNeedsDisplayRect(recorded_viewport_);
69 Region invalidation; 73 Region invalidation;
70 gfx::Rect new_recorded_viewport = client_.PaintableRegion(); 74 gfx::Rect new_recorded_viewport = client_.PaintableRegion();
71 scoped_refptr<DisplayItemList> display_list = 75 scoped_refptr<DisplayItemList> display_list =
72 client_.PaintContentsToDisplayList( 76 client_.PaintContentsToDisplayList(
73 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL); 77 ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
74 size_t painter_reported_memory_usage = 78 size_t painter_reported_memory_usage =
75 client_.GetApproximateUnsharedMemoryUsage(); 79 client_.GetApproximateUnsharedMemoryUsage();
76 UpdateAndExpandInvalidation(&invalidation, size_, new_recorded_viewport); 80 UpdateAndExpandInvalidation(&invalidation, size_, new_recorded_viewport);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 137
134 private: 138 private:
135 FakeContentLayerClient client_; 139 FakeContentLayerClient client_;
136 PaintFlags default_flags_; 140 PaintFlags default_flags_;
137 base::WaitableEvent* playback_allowed_event_; 141 base::WaitableEvent* playback_allowed_event_;
138 }; 142 };
139 143
140 } // namespace cc 144 } // namespace cc
141 145
142 #endif // CC_TEST_FAKE_RECORDING_SOURCE_H_ 146 #endif // CC_TEST_FAKE_RECORDING_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.cc ('k') | cc/test/test_layer_tree_host_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698