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

Unified Diff: cc/image_layer.cc

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector 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
« no previous file with comments | « cc/image_layer.h ('k') | cc/io_surface_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/image_layer.cc
diff --git a/cc/image_layer.cc b/cc/image_layer.cc
index 3c1712eeffc280d3af0e5ae3372965442ee9bb33..224f938bff9b733296cb6ed0bbdfe7829449de16 100644
--- a/cc/image_layer.cc
+++ b/cc/image_layer.cc
@@ -119,7 +119,7 @@ void ImageLayer::update(ResourceUpdateQueue& queue, const OcclusionTracker* occl
if (m_needsDisplay) {
m_updater->setBitmap(m_bitmap);
updateTileSizeAndTilingOption();
- invalidateContentRect(IntRect(IntPoint(), contentBounds()));
+ invalidateContentRect(gfx::Rect(gfx::Point(), contentBounds()));
m_needsDisplay = false;
}
TiledLayer::update(queue, occlusion, stats);
@@ -140,9 +140,9 @@ LayerUpdater* ImageLayer::updater() const
return m_updater.get();
}
-IntSize ImageLayer::contentBounds() const
+gfx::Size ImageLayer::contentBounds() const
{
- return IntSize(m_bitmap.width(), m_bitmap.height());
+ return gfx::Size(m_bitmap.width(), m_bitmap.height());
}
bool ImageLayer::drawsContent() const
@@ -152,14 +152,14 @@ bool ImageLayer::drawsContent() const
float ImageLayer::contentsScaleX() const
{
- if (bounds().isEmpty() || contentBounds().isEmpty())
+ if (bounds().IsEmpty() || contentBounds().IsEmpty())
return 1;
return static_cast<float>(m_bitmap.width()) / bounds().width();
}
float ImageLayer::contentsScaleY() const
{
- if (bounds().isEmpty() || contentBounds().isEmpty())
+ if (bounds().IsEmpty() || contentBounds().IsEmpty())
return 1;
return static_cast<float>(m_bitmap.height()) / bounds().height();
}
« no previous file with comments | « cc/image_layer.h ('k') | cc/io_surface_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698