diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-26 21:36:30 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-26 21:36:30 +0000 |
commit | 1bbe184ba49c0ac30d193777a16331b6baa4f104 (patch) | |
tree | 83147fb48675776649f8ffd357d721df0319e582 /base/gfx/bitmap_platform_device_mac.cc | |
parent | 2b861aca51727686bca140800841a9bd29485a91 (diff) | |
download | chromium_src-1bbe184ba49c0ac30d193777a16331b6baa4f104.zip chromium_src-1bbe184ba49c0ac30d193777a16331b6baa4f104.tar.gz chromium_src-1bbe184ba49c0ac30d193777a16331b6baa4f104.tar.bz2 |
Remove setDeviceOffset which isn't used. Fixed a few style and line wrapping issues.
Review URL: http://codereview.chromium.org/5012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx/bitmap_platform_device_mac.cc')
-rwxr-xr-x | base/gfx/bitmap_platform_device_mac.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/base/gfx/bitmap_platform_device_mac.cc b/base/gfx/bitmap_platform_device_mac.cc index 24915d5..0bae190 100755 --- a/base/gfx/bitmap_platform_device_mac.cc +++ b/base/gfx/bitmap_platform_device_mac.cc @@ -67,18 +67,13 @@ class BitmapPlatformDeviceMac::BitmapPlatformDeviceMacData void SetTransform(const SkMatrix& t); void SetClipRegion(const SkRegion& region); - // Loads the current transform (taking into account offset_*_) and clip - // into the DC. Can be called even when |bitmap_context_| is NULL (will be - // a NOP). + // Loads the current transform and clip into the DC. Can be called even when + // |bitmap_context_| is NULL (will be a NOP). void LoadConfig(); // Lazily-created graphics context used to draw into the bitmap. CGContextRef bitmap_context_; - // Additional offset applied to the transform. See setDeviceOffset(). - int offset_x_; - int offset_y_; - // True when there is a transform or clip that has not been set to the // CGContext. The CGContext is retrieved for every text operation, and the // transform and clip do not change as much. We can save time by not loading @@ -106,8 +101,6 @@ BitmapPlatformDeviceMac::\ BitmapPlatformDeviceMacData::BitmapPlatformDeviceMacData( CGContextRef bitmap) : bitmap_context_(bitmap), - offset_x_(0), - offset_y_(0), config_dirty_(true) { // Want to load the config next time. DCHECK(bitmap_context_); // Initialize the clip region to the entire bitmap. @@ -140,12 +133,10 @@ void BitmapPlatformDeviceMac::BitmapPlatformDeviceMacData::LoadConfig() { // Transform. SkMatrix t(transform_); - t.postTranslate(SkIntToScalar(-offset_x_), SkIntToScalar(-offset_y_)); LoadTransformToCGContext(bitmap_context_, t); // TODO(brettw) we should support more than just rect clipping here. SkIRect rect = clip_region_.getBounds(); - rect.offset(-offset_x_, -offset_y_); CGContextClipToRect(bitmap_context_, SkIRectToCGRect(rect)); } @@ -227,11 +218,6 @@ void BitmapPlatformDeviceMac::SetTransform(const SkMatrix& matrix) { data_->SetTransform(matrix); } -void BitmapPlatformDeviceMac::SetDeviceOffset(int x, int y) { - data_->offset_x_ = x; - data_->offset_y_ = y; -} - void BitmapPlatformDeviceMac::SetClipRegion(const SkRegion& region) { data_->SetClipRegion(region); } |