diff options
author | 2011-08-30 15:56:11 +0000 | |
---|---|---|
committer | 2011-08-30 15:56:11 +0000 | |
commit | d51bfa0583c82c7b731b993e56159fbf815dd2e0 (patch) | |
tree | cc734c247447c50d0403d8e7b9dfc91aaca0f397 /src/core/SkDevice.cpp | |
parent | 849ad5af851fc5bfe75e76cdd0bac44e5f9ec6dd (diff) |
rename getBounds to getGlobalBounds, since it now takes the device's origin
into account. Remove unused intersects().
git-svn-id: http://skia.googlecode.com/svn/trunk@2193 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r-- | src/core/SkDevice.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 97722316db..69f86ccf52 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -83,19 +83,13 @@ const SkBitmap& SkDevice::accessBitmap(bool changePixels) { return fBitmap; } -void SkDevice::getBounds(SkIRect* bounds) const { +void SkDevice::getGlobalBounds(SkIRect* bounds) const { if (bounds) { - bounds->set(0, 0, fBitmap.width(), fBitmap.height()); + bounds->setXYWH(fOrigin.x(), fOrigin.y(), + fBitmap.width(), fBitmap.height()); } } -bool SkDevice::intersects(const SkIRect& r, SkIRect* sect) const { - SkIRect bounds; - - this->getBounds(&bounds); - return sect ? sect->intersect(r, bounds) : SkIRect::Intersects(r, bounds); -} - void SkDevice::clear(SkColor color) { fBitmap.eraseColor(color); } |