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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 271533011: cc: Move tiling management out of draw properties calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PictureImageLayerImpl unittests updated. Created 6 years, 7 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
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/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const { 246 void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const {
247 state->SetAll(draw_properties_.target_space_transform, 247 state->SetAll(draw_properties_.target_space_transform,
248 draw_properties_.content_bounds, 248 draw_properties_.content_bounds,
249 draw_properties_.visible_content_rect, 249 draw_properties_.visible_content_rect,
250 draw_properties_.clip_rect, 250 draw_properties_.clip_rect,
251 draw_properties_.is_clipped, 251 draw_properties_.is_clipped,
252 draw_properties_.opacity, 252 draw_properties_.opacity,
253 blend_mode_); 253 blend_mode_);
254 } 254 }
255 255
256 void LayerImpl::PopulateSharedQuadStateWithOverrides(
257 SharedQuadState* state,
258 gfx::Transform target_space_transform,
259 gfx::Size content_bounds,
260 gfx::Rect visible_content_rect) const {
261 state->SetAll(target_space_transform,
262 content_bounds,
263 visible_content_rect,
264 draw_properties_.clip_rect,
265 draw_properties_.is_clipped,
266 draw_properties_.opacity,
267 blend_mode_);
268 }
269
256 bool LayerImpl::WillDraw(DrawMode draw_mode, 270 bool LayerImpl::WillDraw(DrawMode draw_mode,
257 ResourceProvider* resource_provider) { 271 ResourceProvider* resource_provider) {
258 // WillDraw/DidDraw must be matched. 272 // WillDraw/DidDraw must be matched.
259 DCHECK_NE(DRAW_MODE_NONE, draw_mode); 273 DCHECK_NE(DRAW_MODE_NONE, draw_mode);
260 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); 274 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_);
261 current_draw_mode_ = draw_mode; 275 current_draw_mode_ = draw_mode;
262 return true; 276 return true;
263 } 277 }
264 278
265 void LayerImpl::DidDraw(ResourceProvider* resource_provider) { 279 void LayerImpl::DidDraw(ResourceProvider* resource_provider) {
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1524 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1511 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1525 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1512 AsValueInto(state.get()); 1526 AsValueInto(state.get());
1513 return state.PassAs<base::Value>(); 1527 return state.PassAs<base::Value>();
1514 } 1528 }
1515 1529
1516 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1530 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1517 benchmark->RunOnLayer(this); 1531 benchmark->RunOnLayer(this);
1518 } 1532 }
1519 } // namespace cc 1533 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698