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 #include "cc/output/overlay_candidate.h" | 5 #include "cc/output/overlay_candidate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/gfx/geometry/rect_conversions.h" | 9 #include "ui/gfx/geometry/rect_conversions.h" |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 default: | 121 default: |
122 return gfx::OVERLAY_TRANSFORM_INVALID; | 122 return gfx::OVERLAY_TRANSFORM_INVALID; |
123 } | 123 } |
124 break; | 124 break; |
125 default: | 125 default: |
126 return gfx::OVERLAY_TRANSFORM_INVALID; | 126 return gfx::OVERLAY_TRANSFORM_INVALID; |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 // static | 130 // static |
131 gfx::Rect OverlayCandidate::GetOverlayRect(const gfx::Transform& quad_transform, | 131 gfx::RectF OverlayCandidate::GetOverlayRect( |
132 const gfx::Rect& rect) { | 132 const gfx::Transform& quad_transform, |
| 133 const gfx::Rect& rect) { |
133 DCHECK(quad_transform.IsPositiveScaleOrTranslation()); | 134 DCHECK(quad_transform.IsPositiveScaleOrTranslation()); |
134 | 135 |
135 gfx::RectF float_rect(rect); | 136 gfx::RectF float_rect(rect); |
136 quad_transform.TransformRect(&float_rect); | 137 quad_transform.TransformRect(&float_rect); |
137 return gfx::ToNearestRect(float_rect); | 138 return float_rect; |
138 } | 139 } |
139 | 140 |
140 } // namespace cc | 141 } // namespace cc |
OLD | NEW |