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

Side by Side Diff: cc/resources/display_list_recording_source.cc

Issue 1094553002: Revert "Speculative revert by sheriff" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/resources/display_item_list_unittest.cc ('k') | cc/resources/drawing_display_item.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/resources/display_list_recording_source.h" 5 #include "cc/resources/display_list_recording_source.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/base/histograms.h" 9 #include "cc/base/histograms.h"
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 int repeat_count = 1; 113 int repeat_count = 1;
114 if (slow_down_raster_scale_factor_for_debug_ > 1) { 114 if (slow_down_raster_scale_factor_for_debug_ > 1) {
115 repeat_count = slow_down_raster_scale_factor_for_debug_; 115 repeat_count = slow_down_raster_scale_factor_for_debug_;
116 if (painting_control != 116 if (painting_control !=
117 ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED) { 117 ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED) {
118 painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED; 118 painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED;
119 } 119 }
120 } 120 }
121 for (int i = 0; i < repeat_count; ++i) { 121 for (int i = 0; i < repeat_count; ++i) {
122 display_list_ = painter->PaintContentsToDisplayList(recorded_viewport_, 122 const bool use_cached_picture = true;
123 painting_control); 123 display_list_ =
124 DisplayItemList::Create(recorded_viewport_, use_cached_picture);
125 painter->PaintContentsToDisplayList(display_list_.get(), recorded_viewport_,
126 painting_control);
124 } 127 }
125 display_list_->set_layer_rect(recorded_viewport_); 128 display_list_->CreateAndCacheSkPicture();
129
126 is_suitable_for_gpu_rasterization_ = 130 is_suitable_for_gpu_rasterization_ =
127 display_list_->IsSuitableForGpuRasterization(); 131 display_list_->IsSuitableForGpuRasterization();
128
129 DetermineIfSolidColor(); 132 DetermineIfSolidColor();
130 display_list_->EmitTraceSnapshot(); 133 display_list_->EmitTraceSnapshot();
131
132 display_list_->CreateAndCacheSkPicture();
133 if (gather_pixel_refs_) 134 if (gather_pixel_refs_)
134 display_list_->GatherPixelRefs(grid_cell_size_); 135 display_list_->GatherPixelRefs(grid_cell_size_);
135 136
136 return true; 137 return true;
137 } 138 }
138 139
139 gfx::Size DisplayListRecordingSource::GetSize() const { 140 gfx::Size DisplayListRecordingSource::GetSize() const {
140 return size_; 141 return size_;
141 } 142 }
142 143
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); 195 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_);
195 } 196 }
196 197
197 void DisplayListRecordingSource::Clear() { 198 void DisplayListRecordingSource::Clear() {
198 recorded_viewport_ = gfx::Rect(); 199 recorded_viewport_ = gfx::Rect();
199 display_list_ = NULL; 200 display_list_ = NULL;
200 is_solid_color_ = false; 201 is_solid_color_ = false;
201 } 202 }
202 203
203 } // namespace cc 204 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/display_item_list_unittest.cc ('k') | cc/resources/drawing_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698