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

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

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/painted_scrollbar_layer.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/scrollbar_animation_controller.h" 10 #include "cc/animation/scrollbar_animation_controller.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 if (replica_layer_) 743 if (replica_layer_)
744 replica_layer_->set_parent(this); 744 replica_layer_->set_parent(this);
745 NoteLayerPropertyChangedForSubtree(); 745 NoteLayerPropertyChangedForSubtree();
746 } 746 }
747 747
748 scoped_ptr<LayerImpl> LayerImpl::TakeReplicaLayer() { 748 scoped_ptr<LayerImpl> LayerImpl::TakeReplicaLayer() {
749 replica_layer_id_ = -1; 749 replica_layer_id_ = -1;
750 return replica_layer_.Pass(); 750 return replica_layer_.Pass();
751 } 751 }
752 752
753 PaintedScrollbarLayerImpl* LayerImpl::ToScrollbarLayer() { 753 ScrollbarLayerImplBase* LayerImpl::ToScrollbarLayer() {
754 return NULL; 754 return NULL;
755 } 755 }
756 756
757 void LayerImpl::SetDrawsContent(bool draws_content) { 757 void LayerImpl::SetDrawsContent(bool draws_content) {
758 if (draws_content_ == draws_content) 758 if (draws_content_ == draws_content)
759 return; 759 return;
760 760
761 draws_content_ = draws_content; 761 draws_content_ = draws_content;
762 NoteLayerPropertyChanged(); 762 NoteLayerPropertyChanged();
763 } 763 }
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 this, fadeout_delay, fadeout_length) 1125 this, fadeout_delay, fadeout_length)
1126 .PassAs<ScrollbarAnimationController>(); 1126 .PassAs<ScrollbarAnimationController>();
1127 break; 1127 break;
1128 } 1128 }
1129 case LayerTreeSettings::NoAnimator: 1129 case LayerTreeSettings::NoAnimator:
1130 NOTREACHED(); 1130 NOTREACHED();
1131 break; 1131 break;
1132 } 1132 }
1133 } 1133 }
1134 void LayerImpl::SetHorizontalScrollbarLayer( 1134 void LayerImpl::SetHorizontalScrollbarLayer(
1135 PaintedScrollbarLayerImpl* scrollbar_layer) { 1135 ScrollbarLayerImplBase* scrollbar_layer) {
1136 horizontal_scrollbar_layer_ = scrollbar_layer; 1136 horizontal_scrollbar_layer_ = scrollbar_layer;
1137 if (horizontal_scrollbar_layer_) 1137 if (horizontal_scrollbar_layer_)
1138 horizontal_scrollbar_layer_->set_scroll_layer_id(id()); 1138 horizontal_scrollbar_layer_->set_scroll_layer_id(id());
1139 } 1139 }
1140 1140
1141 void LayerImpl::SetVerticalScrollbarLayer( 1141 void LayerImpl::SetVerticalScrollbarLayer(
1142 PaintedScrollbarLayerImpl* scrollbar_layer) { 1142 ScrollbarLayerImplBase* scrollbar_layer) {
1143 vertical_scrollbar_layer_ = scrollbar_layer; 1143 vertical_scrollbar_layer_ = scrollbar_layer;
1144 if (vertical_scrollbar_layer_) 1144 if (vertical_scrollbar_layer_)
1145 vertical_scrollbar_layer_->set_scroll_layer_id(id()); 1145 vertical_scrollbar_layer_->set_scroll_layer_id(id());
1146 } 1146 }
1147 1147
1148 static scoped_ptr<base::Value> 1148 static scoped_ptr<base::Value>
1149 CompositingReasonsAsValue(CompositingReasons reasons) { 1149 CompositingReasonsAsValue(CompositingReasons reasons) {
1150 scoped_ptr<base::ListValue> reason_list(new base::ListValue()); 1150 scoped_ptr<base::ListValue> reason_list(new base::ListValue());
1151 1151
1152 if (reasons == kCompositingReasonUnknown) { 1152 if (reasons == kCompositingReasonUnknown) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 1307
1308 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } 1308 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; }
1309 1309
1310 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1310 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1311 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1311 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1312 AsValueInto(state.get()); 1312 AsValueInto(state.get());
1313 return state.PassAs<base::Value>(); 1313 return state.PassAs<base::Value>();
1314 } 1314 }
1315 1315
1316 } // namespace cc 1316 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/painted_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698