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

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

Issue 1781993002: Mozart: Compute hits using 4x4 matrix. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-10
Patch Set: Created 4 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_
6 #define SERVICES_GFX_COMPOSITOR_GRAPH_TRANSFORM_PAIR_H_
7
8 #include "third_party/skia/include/utils/SkMatrix44.h"
9
10 namespace compositor {
11
12 // Contains information about a transformation and its inverse.
13 // The inverse is computed lazily and cached.
14 class TransformPair {
15 public:
16 TransformPair(const SkMatrix44& forward);
17 ~TransformPair();
18
19 // Gets the forward transformation.
20 const SkMatrix44& forward() const { return forward_; }
21
22 // Gets the inverse transformation.
23 const SkMatrix44& GetInverse() const;
24
25 // Maps a point using the inverse transformation.
26 const SkPoint InverseMapPoint(const SkPoint& point) const;
27
28 private:
29 const SkMatrix44 forward_;
30 mutable SkMatrix44 cached_inverse_;
31 mutable bool cached_inverse_valid_ = false;
32 };
33
34 } // namespace compositor
35
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/graph/transform_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698