summaryrefslogtreecommitdiffstats
path: root/cc/resource_update_controller.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/resource_update_controller.cc')
-rw-r--r--cc/resource_update_controller.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/cc/resource_update_controller.cc b/cc/resource_update_controller.cc
index b3133c9..55c5277 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