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

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

Issue 219963005: cc: Add support for partial swaps when using impl-side painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP - avoid std::map in TileManager + comments Created 6 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
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 Animation* transform_animation = 1010 Animation* transform_animation =
1011 layer_animation_controller_->GetAnimation(Animation::Transform); 1011 layer_animation_controller_->GetAnimation(Animation::Transform);
1012 return transform_animation && transform_animation->is_impl_only(); 1012 return transform_animation && transform_animation->is_impl_only();
1013 } 1013 }
1014 1014
1015 void LayerImpl::SetUpdateRect(const gfx::RectF& update_rect) { 1015 void LayerImpl::SetUpdateRect(const gfx::RectF& update_rect) {
1016 update_rect_ = update_rect; 1016 update_rect_ = update_rect;
1017 SetNeedsPushProperties(); 1017 SetNeedsPushProperties();
1018 } 1018 }
1019 1019
1020 void LayerImpl::UnionDamageRect(gfx::Rect damage_rect) {
1021 damage_rect_ = gfx::UnionRects(damage_rect_, damage_rect);
1022 }
1023
1020 void LayerImpl::SetContentBounds(const gfx::Size& content_bounds) { 1024 void LayerImpl::SetContentBounds(const gfx::Size& content_bounds) {
1021 if (this->content_bounds() == content_bounds) 1025 if (this->content_bounds() == content_bounds)
1022 return; 1026 return;
1023 1027
1024 draw_properties_.content_bounds = content_bounds; 1028 draw_properties_.content_bounds = content_bounds;
1025 NoteLayerPropertyChanged(); 1029 NoteLayerPropertyChanged();
1026 } 1030 }
1027 1031
1028 void LayerImpl::SetContentsScale(float contents_scale_x, 1032 void LayerImpl::SetContentsScale(float contents_scale_x,
1029 float contents_scale_y) { 1033 float contents_scale_y) {
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1504 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1501 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1505 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1502 AsValueInto(state.get()); 1506 AsValueInto(state.get());
1503 return state.PassAs<base::Value>(); 1507 return state.PassAs<base::Value>();
1504 } 1508 }
1505 1509
1506 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1510 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1507 benchmark->RunOnLayer(this); 1511 benchmark->RunOnLayer(this);
1508 } 1512 }
1509 } // namespace cc 1513 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698