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

Side by Side Diff: ui/views/view.h

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 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
« no previous file with comments | « ui/views/controls/native/native_view_host_aura.cc ('k') | ui/views/view.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 // recurses through all children. This is used when adding a layer to an 1104 // recurses through all children. This is used when adding a layer to an
1105 // existing view to make sure all descendants that have layers are parented to 1105 // existing view to make sure all descendants that have layers are parented to
1106 // the right layer. 1106 // the right layer.
1107 void MoveLayerToParent(ui::Layer* parent_layer, const gfx::Point& point); 1107 void MoveLayerToParent(ui::Layer* parent_layer, const gfx::Point& point);
1108 1108
1109 // Called to update the bounds of any child layers within this View's 1109 // Called to update the bounds of any child layers within this View's
1110 // hierarchy when something happens to the hierarchy. 1110 // hierarchy when something happens to the hierarchy.
1111 void UpdateChildLayerBounds(const gfx::Vector2d& offset); 1111 void UpdateChildLayerBounds(const gfx::Vector2d& offset);
1112 1112
1113 // Overridden from ui::LayerDelegate: 1113 // Overridden from ui::LayerDelegate:
1114 void OnPaintLayer(gfx::Canvas* canvas) override; 1114 void OnPaintLayer(const ui::PaintContext& context) override;
1115 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; 1115 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
1116 void OnDeviceScaleFactorChanged(float device_scale_factor) override; 1116 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
1117 base::Closure PrepareForLayerBoundsChange() override; 1117 base::Closure PrepareForLayerBoundsChange() override;
1118 1118
1119 // Finds the layer that this view paints to (it may belong to an ancestor 1119 // Finds the layer that this view paints to (it may belong to an ancestor
1120 // view), then reorders the immediate children of that layer to match the 1120 // view), then reorders the immediate children of that layer to match the
1121 // order of the view tree. 1121 // order of the view tree.
1122 virtual void ReorderLayers(); 1122 virtual void ReorderLayers();
1123 1123
1124 // This reorders the immediate children of |*parent_layer| to match the 1124 // This reorders the immediate children of |*parent_layer| to match the
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // Belongs to this view, but it's reference-counted on some platforms 1564 // Belongs to this view, but it's reference-counted on some platforms
1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1566 NativeViewAccessibility* native_view_accessibility_; 1566 NativeViewAccessibility* native_view_accessibility_;
1567 1567
1568 DISALLOW_COPY_AND_ASSIGN(View); 1568 DISALLOW_COPY_AND_ASSIGN(View);
1569 }; 1569 };
1570 1570
1571 } // namespace views 1571 } // namespace views
1572 1572
1573 #endif // UI_VIEWS_VIEW_H_ 1573 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/native/native_view_host_aura.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698