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

Side by Side Diff: services/gfx/compositor/graph/transform_pair.h

Issue 2011713003: Roll skia to 8cc209111876b7c78b5ec577c9221d8ed5e21024 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_ 5 #ifndef SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_
6 #define SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_ 6 #define SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_
7 7
8 #include "third_party/skia/include/utils/SkMatrix44.h" 8 #include "third_party/skia/include/core/SkMatrix44.h"
9 9
10 namespace compositor { 10 namespace compositor {
11 11
12 // Contains information about a transformation and its inverse. 12 // Contains information about a transformation and its inverse.
13 // The inverse is computed lazily and cached. 13 // The inverse is computed lazily and cached.
14 class TransformPair { 14 class TransformPair {
15 public: 15 public:
16 TransformPair(const SkMatrix44& forward); 16 TransformPair(const SkMatrix44& forward);
17 ~TransformPair(); 17 ~TransformPair();
18 18
19 // Gets the forward transformation. 19 // Gets the forward transformation.
20 const SkMatrix44& forward() const { return forward_; } 20 const SkMatrix44& forward() const { return forward_; }
21 21
22 // Gets the inverse transformation. 22 // Gets the inverse transformation.
23 const SkMatrix44& GetInverse() const; 23 const SkMatrix44& GetInverse() const;
24 24
25 // Maps a point using the inverse transformation. 25 // Maps a point using the inverse transformation.
26 const SkPoint InverseMapPoint(const SkPoint& point) const; 26 const SkPoint InverseMapPoint(const SkPoint& point) const;
27 27
28 private: 28 private:
29 const SkMatrix44 forward_; 29 const SkMatrix44 forward_;
30 mutable SkMatrix44 cached_inverse_; 30 mutable SkMatrix44 cached_inverse_;
31 mutable bool cached_inverse_valid_ = false; 31 mutable bool cached_inverse_valid_ = false;
32 }; 32 };
33 33
34 } // namespace compositor 34 } // namespace compositor
35 35
36 #endif // SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_ 36 #endif // SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_
OLDNEW
« no previous file with comments | « services/gfx/compositor/graph/snapshot.cc ('k') | services/gfx/compositor/render/render_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698