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

Side by Side Diff: cc/layer_impl.cc

Issue 11731002: Implement a method to access the non-composited content root layer picture pile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes. Created 7 years, 11 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
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/layer_impl.h" 5 #include "cc/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_registrar.h" 10 #include "cc/animation_registrar.h"
11 #include "cc/debug_border_draw_quad.h" 11 #include "cc/debug_border_draw_quad.h"
12 #include "cc/debug_colors.h" 12 #include "cc/debug_colors.h"
13 #include "cc/layer_tree_debug_state.h" 13 #include "cc/layer_tree_debug_state.h"
14 #include "cc/layer_tree_impl.h" 14 #include "cc/layer_tree_impl.h"
15 #include "cc/layer_tree_settings.h" 15 #include "cc/layer_tree_settings.h"
16 #include "cc/math_util.h" 16 #include "cc/math_util.h"
17 #include "cc/picture_pile_impl.h"
17 #include "cc/proxy.h" 18 #include "cc/proxy.h"
18 #include "cc/quad_sink.h" 19 #include "cc/quad_sink.h"
19 #include "cc/scrollbar_animation_controller.h" 20 #include "cc/scrollbar_animation_controller.h"
20 #include "cc/scrollbar_animation_controller_linear_fade.h" 21 #include "cc/scrollbar_animation_controller_linear_fade.h"
21 #include "ui/gfx/point_conversions.h" 22 #include "ui/gfx/point_conversions.h"
22 #include "ui/gfx/rect_conversions.h" 23 #include "ui/gfx/rect_conversions.h"
23 24
24 namespace cc { 25 namespace cc {
25 26
26 LayerImpl::LayerImpl(LayerTreeImpl* treeImpl, int id) 27 LayerImpl::LayerImpl(LayerTreeImpl* treeImpl, int id)
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 292
292 gfx::Rect LayerImpl::layerRectToContentRect(const gfx::RectF& layerRect) const 293 gfx::Rect LayerImpl::layerRectToContentRect(const gfx::RectF& layerRect) const
293 { 294 {
294 gfx::RectF contentRect = gfx::ScaleRect(layerRect, contentsScaleX(), content sScaleY()); 295 gfx::RectF contentRect = gfx::ScaleRect(layerRect, contentsScaleX(), content sScaleY());
295 // Intersect with content rect to avoid the extra pixel because for some 296 // Intersect with content rect to avoid the extra pixel because for some
296 // values x and y, ceil((x / y) * y) may be x + 1. 297 // values x and y, ceil((x / y) * y) may be x + 1.
297 contentRect.Intersect(gfx::Rect(gfx::Point(), contentBounds())); 298 contentRect.Intersect(gfx::Rect(gfx::Point(), contentBounds()));
298 return gfx::ToEnclosingRect(contentRect); 299 return gfx::ToEnclosingRect(contentRect);
299 } 300 }
300 301
302 scoped_refptr<PicturePileImpl> LayerImpl::GetPicturePileClone() const
303 {
304 return scoped_refptr<PicturePileImpl>();
305 }
306
301 std::string LayerImpl::indentString(int indent) 307 std::string LayerImpl::indentString(int indent)
302 { 308 {
303 std::string str; 309 std::string str;
304 for (int i = 0; i != indent; ++i) 310 for (int i = 0; i != indent; ++i)
305 str.append(" "); 311 str.append(" ");
306 return str; 312 return str;
307 } 313 }
308 314
309 void LayerImpl::dumpLayerProperties(std::string* str, int indent) const 315 void LayerImpl::dumpLayerProperties(std::string* str, int indent) const
310 { 316 {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 822
817 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 823 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
818 { 824 {
819 if (!m_scrollbarAnimationController) 825 if (!m_scrollbarAnimationController)
820 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 826 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
821 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 827 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
822 m_scrollbarAnimationController->updateScrollOffset(this); 828 m_scrollbarAnimationController->updateScrollOffset(this);
823 } 829 }
824 830
825 } // namespace cc 831 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_impl.h ('k') | cc/layer_tree_host.h » ('j') | cc/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698