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

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

Issue 13863015: Add flag for drawing layers to screen with Ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stencil buffer support, --draw-layers-with-ganesh Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/picture_layer_impl.cc » ('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/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 NoteLayerPropertyChanged(); 521 NoteLayerPropertyChanged();
522 NoteLayerPropertyChangedForDescendants(); 522 NoteLayerPropertyChangedForDescendants();
523 } 523 }
524 524
525 void LayerImpl::NoteLayerPropertyChangedForDescendants() { 525 void LayerImpl::NoteLayerPropertyChangedForDescendants() {
526 layer_tree_impl()->set_needs_update_draw_properties(); 526 layer_tree_impl()->set_needs_update_draw_properties();
527 for (size_t i = 0; i < children_.size(); ++i) 527 for (size_t i = 0; i < children_.size(); ++i)
528 children_[i]->NoteLayerPropertyChangedForSubtree(); 528 children_[i]->NoteLayerPropertyChangedForSubtree();
529 } 529 }
530 530
531 bool LayerImpl::CanDrawDirectlyToBackbuffer() const {
532 return render_target() == layer_tree_impl_->root_layer() &&
533 draw_opacity() == 1.f && !draw_opacity_is_animating();
534 }
535
531 const char* LayerImpl::LayerTypeAsString() const { 536 const char* LayerImpl::LayerTypeAsString() const {
532 return "Layer"; 537 return "Layer";
533 } 538 }
534 539
535 void LayerImpl::ResetAllChangeTrackingForSubtree() { 540 void LayerImpl::ResetAllChangeTrackingForSubtree() {
536 layer_property_changed_ = false; 541 layer_property_changed_ = false;
537 layer_surface_property_changed_ = false; 542 layer_surface_property_changed_ = false;
538 543
539 update_rect_ = gfx::RectF(); 544 update_rect_ = gfx::RectF();
540 545
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 dict->Set("layer_quad", MathUtil::AsValue(layer_quad).release()); 968 dict->Set("layer_quad", MathUtil::AsValue(layer_quad).release());
964 } 969 }
965 970
966 scoped_ptr<base::Value> LayerImpl::AsValue() const { 971 scoped_ptr<base::Value> LayerImpl::AsValue() const {
967 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 972 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
968 AsValueInto(state.get()); 973 AsValueInto(state.get());
969 return state.PassAs<base::Value>(); 974 return state.PassAs<base::Value>();
970 } 975 }
971 976
972 } // namespace cc 977 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698