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

Side by Side Diff: ui/gfx/transform.h

Issue 8368013: Improve Aura overdraw by changing hole calculation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer diff Created 9 years, 2 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 | Annotate | Revision Log
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 #ifndef UI_GFX_TRANSFORM_H_ 5 #ifndef UI_GFX_TRANSFORM_H_
6 #define UI_GFX_TRANSFORM_H_ 6 #define UI_GFX_TRANSFORM_H_
7 #pragma once 7 #pragma once
8 8
9 #include "third_party/skia/include/utils/SkMatrix44.h" 9 #include "third_party/skia/include/utils/SkMatrix44.h"
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // (i.e. 'this = this * transform;'). 62 // (i.e. 'this = this * transform;').
63 void PreconcatTransform(const Transform& transform); 63 void PreconcatTransform(const Transform& transform);
64 64
65 // Applies a transformation on the current transformation 65 // Applies a transformation on the current transformation
66 // (i.e. 'this = transform * this;'). 66 // (i.e. 'this = transform * this;').
67 void ConcatTransform(const Transform& transform); 67 void ConcatTransform(const Transform& transform);
68 68
69 // Does the transformation change anything? 69 // Does the transformation change anything?
70 bool HasChange() const; 70 bool HasChange() const;
71 71
72 // Inverts the transform. Returns true if successful;
73 bool Invert();
74
72 // Applies the transformation on the point. Returns true if the point is 75 // Applies the transformation on the point. Returns true if the point is
73 // transformed successfully. 76 // transformed successfully.
74 void TransformPoint(gfx::Point3f& point) const; 77 void TransformPoint(gfx::Point3f& point) const;
75 78
76 // Applies the transformation on the point. Returns true if the point is 79 // Applies the transformation on the point. Returns true if the point is
77 // transformed successfully. Rounds the result to the nearest point. 80 // transformed successfully. Rounds the result to the nearest point.
78 void TransformPoint(gfx::Point& point) const; 81 void TransformPoint(gfx::Point& point) const;
79 82
80 // Applies the reverse transformation on the point. Returns true if the 83 // Applies the reverse transformation on the point. Returns true if the
81 // transformation can be inverted. 84 // transformation can be inverted.
(...skipping 26 matching lines...) Expand all
108 gfx::Point3f& point) const; 111 gfx::Point3f& point) const;
109 112
110 SkMatrix44 matrix_; 113 SkMatrix44 matrix_;
111 114
112 // copy/assign are allowed. 115 // copy/assign are allowed.
113 }; 116 };
114 117
115 }// namespace ui 118 }// namespace ui
116 119
117 #endif // UI_GFX_TRANSFORM_H_ 120 #endif // UI_GFX_TRANSFORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698