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

Side by Side Diff: cc/layer_impl.cc

Issue 11465007: Move LayerSorter to exist locally only in layer_tree_host_common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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/layer_impl.h ('k') | cc/layer_tree_host_common.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/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 "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/debug_colors.h" 10 #include "cc/debug_colors.h"
11 #include "cc/layer_sorter.h"
12 #include "cc/layer_tree_host_impl.h" 11 #include "cc/layer_tree_host_impl.h"
13 #include "cc/math_util.h" 12 #include "cc/math_util.h"
14 #include "cc/proxy.h" 13 #include "cc/proxy.h"
15 #include "cc/quad_sink.h" 14 #include "cc/quad_sink.h"
16 #include "cc/scrollbar_animation_controller.h" 15 #include "cc/scrollbar_animation_controller.h"
17 #include "ui/gfx/point_conversions.h" 16 #include "ui/gfx/point_conversions.h"
18 #include "ui/gfx/rect_conversions.h" 17 #include "ui/gfx/rect_conversions.h"
19 18
20 namespace cc { 19 namespace cc {
21 20
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 base::StringAppendF(str, "drawTransform: %f, %f, %f, %f // %f, %f, %f, %f // %f, %f, %f, %f // %f, %f, %f, %f\n", 308 base::StringAppendF(str, "drawTransform: %f, %f, %f, %f // %f, %f, %f, %f // %f, %f, %f, %f // %f, %f, %f, %f\n",
310 transform.matrix().getDouble(0, 0), transform.matrix().getDouble(0, 1), transform.matrix().getDouble(0, 2), transform.matrix().getDouble(0, 3), 309 transform.matrix().getDouble(0, 0), transform.matrix().getDouble(0, 1), transform.matrix().getDouble(0, 2), transform.matrix().getDouble(0, 3),
311 transform.matrix().getDouble(1, 0), transform.matrix().getDouble(1, 1), transform.matrix().getDouble(1, 2), transform.matrix().getDouble(1, 3), 310 transform.matrix().getDouble(1, 0), transform.matrix().getDouble(1, 1), transform.matrix().getDouble(1, 2), transform.matrix().getDouble(1, 3),
312 transform.matrix().getDouble(2, 0), transform.matrix().getDouble(2, 1), transform.matrix().getDouble(2, 2), transform.matrix().getDouble(2, 3), 311 transform.matrix().getDouble(2, 0), transform.matrix().getDouble(2, 1), transform.matrix().getDouble(2, 2), transform.matrix().getDouble(2, 3),
313 transform.matrix().getDouble(3, 0), transform.matrix().getDouble(3, 1), transform.matrix().getDouble(3, 2), transform.matrix().getDouble(3, 3)); 312 transform.matrix().getDouble(3, 0), transform.matrix().getDouble(3, 1), transform.matrix().getDouble(3, 2), transform.matrix().getDouble(3, 3));
314 313
315 str->append(indentStr); 314 str->append(indentStr);
316 base::StringAppendF(str, "drawsContent: %s\n", m_drawsContent ? "yes" : "no" ); 315 base::StringAppendF(str, "drawsContent: %s\n", m_drawsContent ? "yes" : "no" );
317 } 316 }
318 317
319 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*> ::iterator end, LayerSorter* layerSorter)
320 {
321 TRACE_EVENT0("cc", "LayerImpl::sortLayers");
322 layerSorter->sort(first, end);
323 }
324
325 std::string LayerImpl::layerTreeAsText() const 318 std::string LayerImpl::layerTreeAsText() const
326 { 319 {
327 std::string str; 320 std::string str;
328 dumpLayer(&str, 0); 321 dumpLayer(&str, 0);
329 return str; 322 return str;
330 } 323 }
331 324
332 void LayerImpl::dumpLayer(std::string* str, int indent) const 325 void LayerImpl::dumpLayer(std::string* str, int indent) const
333 { 326 {
334 str->append(indentString(indent)); 327 str->append(indentString(indent));
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 716
724 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 717 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
725 { 718 {
726 if (!m_scrollbarAnimationController) 719 if (!m_scrollbarAnimationController)
727 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 720 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
728 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 721 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
729 m_scrollbarAnimationController->updateScrollOffset(this); 722 m_scrollbarAnimationController->updateScrollOffset(this);
730 } 723 }
731 724
732 } // namespace cc 725 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_impl.h ('k') | cc/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698