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

Unified Diff: cc/resource_update_controller.cc

Issue 11266030: Use gfx:: Geometry types for the resource provider and layer updater classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uint8 Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resource_update.cc ('k') | cc/resource_update_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resource_update_controller.cc
diff --git a/cc/resource_update_controller.cc b/cc/resource_update_controller.cc
index b3133c9846885a2730f743c5b616e39d810482c5..55c52775124e103dda99b57e92bd70161cc86875 100644
--- a/cc/resource_update_controller.cc
+++ b/cc/resource_update_controller.cc
@@ -39,7 +39,7 @@ const int textureUploadFlushPeriod = 4;
const size_t maxBlockingUpdateIntervals = 4;
scoped_ptr<SkCanvas> createAcceleratedCanvas(
- GrContext* grContext, cc::IntSize canvasSize, unsigned textureId)
+ GrContext* grContext, gfx::Size canvasSize, unsigned textureId)
{
GrPlatformTextureDesc textureDesc;
textureDesc.fFlags = kRenderTarget_GrPlatformTextureFlag;
@@ -121,9 +121,9 @@ void ResourceUpdateController::updateTexture(ResourceUpdate update)
{
if (update.picture) {
PrioritizedTexture* texture = update.texture;
- IntRect pictureRect = update.content_rect;
- IntRect sourceRect = update.source_rect;
- IntSize destOffset = update.dest_offset;
+ gfx::Rect pictureRect = update.content_rect;
+ gfx::Rect sourceRect = update.source_rect;
+ gfx::Vector2d destOffset = update.dest_offset;
texture->acquireBackingTexture(m_resourceProvider);
DCHECK(texture->haveBackingTexture());
@@ -159,15 +159,15 @@ void ResourceUpdateController::updateTexture(ResourceUpdate update)
canvas->translate(0.0, texture->size().height());
canvas->scale(1.0, -1.0);
// Clip to the destination on the texture that must be updated.
- canvas->clipRect(SkRect::MakeXYWH(destOffset.width(),
- destOffset.height(),
+ canvas->clipRect(SkRect::MakeXYWH(destOffset.x(),
+ destOffset.y(),
sourceRect.width(),
sourceRect.height()));
// Translate the origin of pictureRect to destOffset.
// Note that destOffset is defined relative to sourceRect.
canvas->translate(
- pictureRect.x() - sourceRect.x() + destOffset.width(),
- pictureRect.y() - sourceRect.y() + destOffset.height());
+ pictureRect.x() - sourceRect.x() + destOffset.x(),
+ pictureRect.y() - sourceRect.y() + destOffset.y());
canvas->drawPicture(*update.picture);
// Flush ganesh context so that all the rendered stuff appears on the
« no previous file with comments | « cc/resource_update.cc ('k') | cc/resource_update_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698