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

Unified Diff: cc/occlusion_tracker.cc

Issue 11369051: cc: Remove WebCore::FloatRect use from the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« cc/cc.gyp ('K') | « cc/gl_renderer.cc ('k') | cc/stubs/FloatRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/occlusion_tracker.cc
diff --git a/cc/occlusion_tracker.cc b/cc/occlusion_tracker.cc
index 15233624f493d8543a35efc4839bc23233ecce94..39bbfe3872494394d8a66dc8301fb914a8d13cdb 100644
--- a/cc/occlusion_tracker.cc
+++ b/cc/occlusion_tracker.cc
@@ -8,7 +8,6 @@
#include <algorithm>
-#include "FloatRect.h"
#include "cc/layer.h"
#include "cc/layer_impl.h"
#include "cc/math_util.h"
@@ -134,7 +133,7 @@ static inline Region transformSurfaceOpaqueRegion(const RenderSurfaceType* surfa
Vector<WebCore::IntRect> rects = region.rects();
for (size_t i = 0; i < rects.size(); ++i) {
// We've already checked for clipping in the mapQuad call above, these calls should not clip anything further.
- gfx::Rect transformedRect = gfx::ToEnclosedRect(MathUtil::mapClippedRect(transform, cc::FloatRect(rects[i])));
+ gfx::Rect transformedRect = gfx::ToEnclosedRect(MathUtil::mapClippedRect(transform, gfx::RectF(gfx::Rect(cc::IntRect(rects[i])))));
enne (OOO) 2012/11/02 18:05:51 This is one heck of a transformation sequence of r
danakj 2012/11/02 18:08:31 Yeh :| WebCore->cc::IntRect so we can convert to
if (!surface->clipRect().IsEmpty())
transformedRect.Intersect(surface->clipRect());
transformedRegion.Union(transformedRect);
@@ -261,7 +260,7 @@ static inline void addOcclusionBehindLayer(Region& region, const LayerType* laye
Vector<WebCore::IntRect> contentRects = opaqueContents.rects();
for (size_t i = 0; i < contentRects.size(); ++i) {
// We've already checked for clipping in the mapQuad call above, these calls should not clip anything further.
- gfx::Rect transformedRect = gfx::ToEnclosedRect(MathUtil::mapClippedRect(transform, cc::FloatRect(contentRects[i])));
+ gfx::Rect transformedRect = gfx::ToEnclosedRect(MathUtil::mapClippedRect(transform, gfx::RectF(gfx::Rect(cc::IntRect(contentRects[i])))));
transformedRect.Intersect(clipRectInTarget);
if (transformedRect.width() >= minimumTrackingSize.width() || transformedRect.height() >= minimumTrackingSize.height()) {
if (occludingScreenSpaceRects)
« cc/cc.gyp ('K') | « cc/gl_renderer.cc ('k') | cc/stubs/FloatRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698