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

Side by Side Diff: views/view.cc

Issue 8508009: Debugging code to print layer tree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« ui/gfx/compositor/debug_utils.cc ('K') | « ui/gfx/compositor/layer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 // Accelerated painting -------------------------------------------------------- 1774 // Accelerated painting --------------------------------------------------------
1775 1775
1776 void View::CreateLayer() { 1776 void View::CreateLayer() {
1777 // A new layer is being created for the view. So all the layers of the 1777 // A new layer is being created for the view. So all the layers of the
1778 // sub-tree can inherit the visibility of the corresponding view. 1778 // sub-tree can inherit the visibility of the corresponding view.
1779 for (int i = 0, count = child_count(); i < count; ++i) 1779 for (int i = 0, count = child_count(); i < count; ++i)
1780 child_at(i)->UpdateChildLayerVisibility(true); 1780 child_at(i)->UpdateChildLayerVisibility(true);
1781 1781
1782 layer_.reset(new ui::Layer(NULL)); 1782 layer_.reset(new ui::Layer(NULL));
1783 layer_->set_delegate(this); 1783 layer_->set_delegate(this);
1784 #if !defined(NDEBUG)
1785 layer_->set_name(GetClassName());
1786 #endif
1784 1787
1785 UpdateParentLayers(); 1788 UpdateParentLayers();
1786 UpdateLayerVisibility(); 1789 UpdateLayerVisibility();
1787 1790
1788 // The new layer needs to be ordered in the layer tree according 1791 // The new layer needs to be ordered in the layer tree according
1789 // to the view tree. Children of this layer were added in order 1792 // to the view tree. Children of this layer were added in order
1790 // in UpdateParentLayers(). 1793 // in UpdateParentLayers().
1791 if (parent()) 1794 if (parent())
1792 parent()->ReorderLayers(); 1795 parent()->ReorderLayers();
1793 } 1796 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 2070
2068 OSExchangeData data; 2071 OSExchangeData data;
2069 WriteDragData(press_pt, &data); 2072 WriteDragData(press_pt, &data);
2070 2073
2071 // Message the RootView to do the drag and drop. That way if we're removed 2074 // Message the RootView to do the drag and drop. That way if we're removed
2072 // the RootView can detect it and avoid calling us back. 2075 // the RootView can detect it and avoid calling us back.
2073 GetWidget()->RunShellDrag(this, data, drag_operations); 2076 GetWidget()->RunShellDrag(this, data, drag_operations);
2074 } 2077 }
2075 2078
2076 } // namespace views 2079 } // namespace views
OLDNEW
« ui/gfx/compositor/debug_utils.cc ('K') | « ui/gfx/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698