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

Side by Side Diff: cc/layer_tree_host_impl.h

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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_IMPL_H_ 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_
6 #define CC_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 gfx::RectF bounds() const; 86 gfx::RectF bounds() const;
87 const gfx::Vector2dF& scrollDelta() const { return m_pinchViewportScrollDelt a; } 87 const gfx::Vector2dF& scrollDelta() const { return m_pinchViewportScrollDelt a; }
88 88
89 void setLayoutViewportSize(const gfx::SizeF& size) { m_layoutViewportSize = size; } 89 void setLayoutViewportSize(const gfx::SizeF& size) { m_layoutViewportSize = size; }
90 90
91 // Apply the scroll offset in layout space to the offset of the pinch-zoom v iewport. The viewport cannot be 91 // Apply the scroll offset in layout space to the offset of the pinch-zoom v iewport. The viewport cannot be
92 // scrolled outside of the layout viewport bounds. Returns the component of the scroll that is un-applied due to 92 // scrolled outside of the layout viewport bounds. Returns the component of the scroll that is un-applied due to
93 // this constraint. 93 // this constraint.
94 gfx::Vector2dF applyScroll(const gfx::Vector2dF&); 94 gfx::Vector2dF applyScroll(const gfx::Vector2dF&);
95 95
96 WebKit::WebTransformationMatrix implTransform(bool pageScalePinchZoomEnabled ) const; 96 gfx::Transform implTransform(bool pageScalePinchZoomEnabled) const;
97 97
98 private: 98 private:
99 float m_pageScaleFactor; 99 float m_pageScaleFactor;
100 float m_pageScaleDelta; 100 float m_pageScaleDelta;
101 float m_sentPageScaleDelta; 101 float m_sentPageScaleDelta;
102 float m_maxPageScaleFactor; 102 float m_maxPageScaleFactor;
103 float m_minPageScaleFactor; 103 float m_minPageScaleFactor;
104 104
105 gfx::Vector2dF m_pinchViewportScrollDelta; 105 gfx::Vector2dF m_pinchViewportScrollDelta;
106 gfx::SizeF m_layoutViewportSize; 106 gfx::SizeF m_layoutViewportSize;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d eviceViewportSize); 213 void setViewportSize(const gfx::Size& layoutViewportSize, const gfx::Size& d eviceViewportSize);
214 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; } 214 const gfx::Size& layoutViewportSize() const { return m_layoutViewportSize; }
215 215
216 float deviceScaleFactor() const { return m_deviceScaleFactor; } 216 float deviceScaleFactor() const { return m_deviceScaleFactor; }
217 void setDeviceScaleFactor(float); 217 void setDeviceScaleFactor(float);
218 218
219 float pageScaleFactor() const; 219 float pageScaleFactor() const;
220 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa ctor, float maxPageScaleFactor); 220 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa ctor, float maxPageScaleFactor);
221 221
222 scoped_ptr<ScrollAndScaleSet> processScrollDeltas(); 222 scoped_ptr<ScrollAndScaleSet> processScrollDeltas();
223 WebKit::WebTransformationMatrix implTransform() const; 223 gfx::Transform implTransform() const;
224 224
225 void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnchor, flo at scale, base::TimeDelta duration); 225 void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnchor, flo at scale, base::TimeDelta duration);
226 226
227 SkColor backgroundColor() const { return m_backgroundColor; } 227 SkColor backgroundColor() const { return m_backgroundColor; }
228 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } 228 void setBackgroundColor(SkColor color) { m_backgroundColor = color; }
229 229
230 bool hasTransparentBackground() const { return m_hasTransparentBackground; } 230 bool hasTransparentBackground() const { return m_hasTransparentBackground; }
231 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro und = transparent; } 231 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro und = transparent; }
232 232
233 bool needsAnimateLayers() const { return m_needsAnimateLayers; } 233 bool needsAnimateLayers() const { return m_needsAnimateLayers; }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 size_t m_numImplThreadScrolls; 363 size_t m_numImplThreadScrolls;
364 size_t m_numMainThreadScrolls; 364 size_t m_numMainThreadScrolls;
365 365
366 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 366 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
367 }; 367 };
368 368
369 } // namespace cc 369 } // namespace cc
370 370
371 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 371 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698