| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_OUTPUT_OVERLAY_CANDIDATE_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| 6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/base/cc_export.h" | |
| 11 #include "cc/resources/resource_format.h" | 10 #include "cc/resources/resource_format.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 13 #include "ui/gfx/overlay_transform.h" | 12 #include "ui/gfx/overlay_transform.h" |
| 14 #include "ui/gfx/transform.h" | 13 #include "ui/gfx/transform.h" |
| 15 | 14 |
| 16 namespace cc { | 15 namespace cc { |
| 17 | 16 |
| 18 class CC_EXPORT OverlayCandidate { | 17 class OverlayCandidate { |
| 19 public: | 18 public: |
| 20 static gfx::OverlayTransform GetOverlayTransform( | 19 static gfx::OverlayTransform GetOverlayTransform( |
| 21 const gfx::Transform& quad_transform, | 20 const gfx::Transform& quad_transform, |
| 22 bool flipped); | 21 bool flipped); |
| 23 // Apply transform |delta| to |in| and return the resulting transform, | 22 // Apply transform |delta| to |in| and return the resulting transform, |
| 24 // or OVERLAY_TRANSFORM_INVALID. | 23 // or OVERLAY_TRANSFORM_INVALID. |
| 25 static gfx::OverlayTransform ModifyTransform(gfx::OverlayTransform in, | 24 static gfx::OverlayTransform ModifyTransform(gfx::OverlayTransform in, |
| 26 gfx::OverlayTransform delta); | 25 gfx::OverlayTransform delta); |
| 27 static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform, | 26 static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform, |
| 28 const gfx::Rect& rect); | 27 const gfx::Rect& rect); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 // To be modified by the implementer if this candidate can go into | 46 // To be modified by the implementer if this candidate can go into |
| 48 // an overlay. | 47 // an overlay. |
| 49 bool overlay_handled; | 48 bool overlay_handled; |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 typedef std::vector<OverlayCandidate> OverlayCandidateList; | 51 typedef std::vector<OverlayCandidate> OverlayCandidateList; |
| 53 | 52 |
| 54 } // namespace cc | 53 } // namespace cc |
| 55 | 54 |
| 56 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 55 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| OLD | NEW |