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

Side by Side Diff: cc/layer_tree_host_common.h

Issue 12082012: Implement desktop compatibility viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aelias
Patch Set: 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
« no previous file with comments | « cc/layer_tree_host_client.h ('k') | cc/layer_tree_host_common.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 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 #ifndef CC_LAYER_TREE_HOST_COMMON_H_ 5 #ifndef CC_LAYER_TREE_HOST_COMMON_H_
6 #define CC_LAYER_TREE_HOST_COMMON_H_ 6 #define CC_LAYER_TREE_HOST_COMMON_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/scoped_ptr_vector.h" 10 #include "cc/scoped_ptr_vector.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 gfx::Vector2d scrollDelta; 52 gfx::Vector2d scrollDelta;
53 }; 53 };
54 }; 54 };
55 55
56 struct CC_EXPORT ScrollAndScaleSet { 56 struct CC_EXPORT ScrollAndScaleSet {
57 ScrollAndScaleSet(); 57 ScrollAndScaleSet();
58 ~ScrollAndScaleSet(); 58 ~ScrollAndScaleSet();
59 59
60 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; 60 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls;
61 float pageScaleDelta; 61 float pageScaleDelta;
62 gfx::Vector2d desktopCompatibilityViewportOffsetFromScrollPositionDelta;
62 }; 63 };
63 64
64 template<typename LayerType> 65 template<typename LayerType>
65 bool LayerTreeHostCommon::renderSurfaceContributesToTarget(LayerType* layer, int targetSurfaceLayerID) 66 bool LayerTreeHostCommon::renderSurfaceContributesToTarget(LayerType* layer, int targetSurfaceLayerID)
66 { 67 {
67 // A layer will either contribute its own content, or its render surface's c ontent, to 68 // A layer will either contribute its own content, or its render surface's c ontent, to
68 // the target surface. The layer contributes its surface's content when both the 69 // the target surface. The layer contributes its surface's content when both the
69 // following are true: 70 // following are true:
70 // (1) The layer actually has a renderSurface, and 71 // (1) The layer actually has a renderSurface, and
71 // (2) The layer's renderSurface is not the same as the targetSurface. 72 // (2) The layer's renderSurface is not the same as the targetSurface.
(...skipping 18 matching lines...) Expand all
90 for (size_t i = 0; i < rootLayer->children().size(); ++i) { 91 for (size_t i = 0; i < rootLayer->children().size(); ++i) {
91 if (LayerType* found = findLayerInSubtree(getChildAsRawPtr(rootLayer->ch ildren(), i), layerId)) 92 if (LayerType* found = findLayerInSubtree(getChildAsRawPtr(rootLayer->ch ildren(), i), layerId))
92 return found; 93 return found;
93 } 94 }
94 return 0; 95 return 0;
95 } 96 }
96 97
97 } // namespace cc 98 } // namespace cc
98 99
99 #endif // CC_LAYER_TREE_HOST_COMMON_H_ 100 #endif // CC_LAYER_TREE_HOST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host_client.h ('k') | cc/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698