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

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

Issue 13285002: cc: Consolidate LayerList types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.h ('k') | cc/layers/layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "cc/animation/animation.h" 10 #include "cc/animation/animation.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 bounds_contain_page_scale_ = bounds_contain_page_scale; 692 bounds_contain_page_scale_ = bounds_contain_page_scale;
693 SetNeedsDisplay(); 693 SetNeedsDisplay();
694 } 694 }
695 695
696 void Layer::CreateRenderSurface() { 696 void Layer::CreateRenderSurface() {
697 DCHECK(!draw_properties_.render_surface); 697 DCHECK(!draw_properties_.render_surface);
698 draw_properties_.render_surface = make_scoped_ptr(new RenderSurface(this)); 698 draw_properties_.render_surface = make_scoped_ptr(new RenderSurface(this));
699 draw_properties_.render_target = this; 699 draw_properties_.render_target = this;
700 } 700 }
701 701
702 void Layer::ClearRenderSurface() {
703 draw_properties_.render_surface.reset();
704 }
705
702 void Layer::OnOpacityAnimated(float opacity) { 706 void Layer::OnOpacityAnimated(float opacity) {
703 // This is called due to an ongoing accelerated animation. Since this 707 // This is called due to an ongoing accelerated animation. Since this
704 // animation is also being run on the impl thread, there is no need to request 708 // animation is also being run on the impl thread, there is no need to request
705 // a commit to push this value over, so set the value directly rather than 709 // a commit to push this value over, so set the value directly rather than
706 // calling SetOpacity. 710 // calling SetOpacity.
707 opacity_ = opacity; 711 opacity_ = opacity;
708 } 712 }
709 713
710 void Layer::OnTransformAnimated(const gfx::Transform& transform) { 714 void Layer::OnTransformAnimated(const gfx::Transform& transform) {
711 // This is called due to an ongoing accelerated animation. Since this 715 // This is called due to an ongoing accelerated animation. Since this
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 820
817 ScrollbarLayer* Layer::ToScrollbarLayer() { 821 ScrollbarLayer* Layer::ToScrollbarLayer() {
818 return NULL; 822 return NULL;
819 } 823 }
820 824
821 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { 825 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const {
822 return layer_tree_host_->rendering_stats_instrumentation(); 826 return layer_tree_host_->rendering_stats_instrumentation();
823 } 827 }
824 828
825 } // namespace cc 829 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698