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

Side by Side Diff: cc/output/overlay_candidate.cc

Issue 1110813002: Fix assert in GetOverlayRect when transforming video with Ozone overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes display_rect to float Created 5 years, 7 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698