| Index: cc/output/overlay_candidate.cc
|
| diff --git a/cc/output/overlay_candidate.cc b/cc/output/overlay_candidate.cc
|
| index dd3ebc27ef05c79fa36b99bcdb2c481d63dbff88..0692cdf97400bf77f5ac78f1ff4ae565770e36a6 100644
|
| --- a/cc/output/overlay_candidate.cc
|
| +++ b/cc/output/overlay_candidate.cc
|
| @@ -2,7 +2,9 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "cc/output/overlay_candidate_validator.h"
|
| +#include "cc/output/overlay_candidate.h"
|
| +
|
| +#include "ui/gfx/rect_conversions.h"
|
|
|
| namespace cc {
|
|
|
| @@ -14,4 +16,24 @@ OverlayCandidate::OverlayCandidate()
|
|
|
| OverlayCandidate::~OverlayCandidate() {}
|
|
|
| +// static
|
| +OverlayCandidate::OverlayTransform OverlayCandidate::GetOverlayTransform(
|
| + const gfx::Transform& quad_transform,
|
| + bool flipped) {
|
| + if (!quad_transform.IsIdentityOrTranslation())
|
| + return INVALID;
|
| +
|
| + return flipped ? FLIP_VERTICAL : NONE;
|
| +}
|
| +
|
| +// static
|
| +gfx::Rect OverlayCandidate::GetOverlayRect(const gfx::Transform& quad_transform,
|
| + const gfx::Rect& rect) {
|
| + DCHECK(quad_transform.IsIdentityOrTranslation());
|
| +
|
| + gfx::RectF float_rect(rect);
|
| + quad_transform.TransformRect(&float_rect);
|
| + return gfx::ToNearestRect(float_rect);
|
| +}
|
| +
|
| } // namespace cc
|
|
|