diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-31 20:52:25 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-31 20:52:25 +0000 |
commit | f809d3bb86532d666d6094497b5b7f93f3b32a9e (patch) | |
tree | e37a05eb364b08446fbdd4a11e77a79eabf48d02 /cc/image_layer.cc | |
parent | d388fe22c8c1c6e80c990be37fe067634bfed7a9 (diff) | |
download | chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.zip chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.tar.gz chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.tar.bz2 |
Use gfx:: Geometry types for the resource provider and layer updater classes.
This depends on the gfx::Vector2d class from https://codereview.chromium.org/11269022/
Covered by existing tests, just changing data types.
BUG=147395
R=enne
Review URL: https://codereview.chromium.org/11266030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/image_layer.cc')
-rw-r--r-- | cc/image_layer.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cc/image_layer.cc b/cc/image_layer.cc index b347736..e162007 100644 --- a/cc/image_layer.cc +++ b/cc/image_layer.cc @@ -23,7 +23,7 @@ public: { } - virtual void update(ResourceUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE + virtual void update(ResourceUpdateQueue& queue, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE { updater()->updateTexture(queue, texture(), sourceRect, destOffset, partialUpdate); } @@ -45,15 +45,15 @@ public: return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedTexture::create(manager))); } - void updateTexture(ResourceUpdateQueue& queue, PrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate) + void updateTexture(ResourceUpdateQueue& queue, PrioritizedTexture* texture, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate) { // Source rect should never go outside the image pixels, even if this // is requested because the texture extends outside the image. - IntRect clippedSourceRect = sourceRect; - IntRect imageRect = IntRect(0, 0, m_bitmap.width(), m_bitmap.height()); - clippedSourceRect.intersect(imageRect); + gfx::Rect clippedSourceRect = sourceRect; + gfx::Rect imageRect = gfx::Rect(0, 0, m_bitmap.width(), m_bitmap.height()); + clippedSourceRect.Intersect(imageRect); - IntSize clippedDestOffset = destOffset + IntSize(clippedSourceRect.location() - sourceRect.location()); + gfx::Vector2d clippedDestOffset = destOffset + (clippedSourceRect.origin() - sourceRect.origin()); ResourceUpdate upload = ResourceUpdate::Create(texture, &m_bitmap, |