summaryrefslogtreecommitdiffstats
path: root/skia/ext
diff options
context:
space:
mode:
authorreed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-25 18:23:17 +0000
committerreed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-25 18:23:17 +0000
commitfc8b5531f7e994b2016f2684a2998b5a53439916 (patch)
treea1082eca5de605f94190b41ff0dab0ebb7f5a2b5 /skia/ext
parent74815ac984f5bbf24616e1d86e007fd315bbdc1d (diff)
downloadchromium_src-fc8b5531f7e994b2016f2684a2998b5a53439916.zip
chromium_src-fc8b5531f7e994b2016f2684a2998b5a53439916.tar.gz
chromium_src-fc8b5531f7e994b2016f2684a2998b5a53439916.tar.bz2
Revert 76069 - roll to rev. 846, includes change to SkDevice setMatrixClip() interface
Review URL: http://codereview.chromium.org/6549029 TBR=reed@google.com Review URL: http://codereview.chromium.org/6596014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext')
-rw-r--r--skia/ext/bitmap_platform_device_linux.cc3
-rw-r--r--skia/ext/bitmap_platform_device_linux.h3
-rw-r--r--skia/ext/bitmap_platform_device_mac.cc3
-rw-r--r--skia/ext/bitmap_platform_device_mac.h3
-rw-r--r--skia/ext/bitmap_platform_device_mac_unittest.cc7
-rw-r--r--skia/ext/bitmap_platform_device_win.cc3
-rw-r--r--skia/ext/bitmap_platform_device_win.h3
-rw-r--r--skia/ext/vector_platform_device_linux.cc3
-rw-r--r--skia/ext/vector_platform_device_linux.h3
-rw-r--r--skia/ext/vector_platform_device_win.cc3
-rw-r--r--skia/ext/vector_platform_device_win.h3
11 files changed, 12 insertions, 25 deletions
diff --git a/skia/ext/bitmap_platform_device_linux.cc b/skia/ext/bitmap_platform_device_linux.cc
index dab2122..4164d93 100644
--- a/skia/ext/bitmap_platform_device_linux.cc
+++ b/skia/ext/bitmap_platform_device_linux.cc
@@ -164,8 +164,7 @@ cairo_t* BitmapPlatformDevice::beginPlatformPaint() {
}
void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
- const SkRegion& region,
- const SkClipStack&) {
+ const SkRegion& region) {
data_->SetMatrixClip(transform, region);
}
diff --git a/skia/ext/bitmap_platform_device_linux.h b/skia/ext/bitmap_platform_device_linux.h
index b4011ac..3a2d71dc 100644
--- a/skia/ext/bitmap_platform_device_linux.h
+++ b/skia/ext/bitmap_platform_device_linux.h
@@ -92,8 +92,7 @@ class BitmapPlatformDevice : public PlatformDevice {
// Overridden from SkDevice:
virtual SkDeviceFactory* getDeviceFactory();
- virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
- const SkClipStack&);
+ virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
// Overridden from PlatformDevice:
virtual bool IsVectorial();
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 75f2f71..5a25abf 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -218,8 +218,7 @@ CGContextRef BitmapPlatformDevice::GetBitmapContext() {
}
void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
- const SkRegion& region,
- const SkClipStack&) {
+ const SkRegion& region) {
data_->SetMatrixClip(transform, region);
}
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 06be3f6..5723c85 100644
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -64,8 +64,7 @@ class BitmapPlatformDevice : public PlatformDevice {
BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
virtual CGContextRef GetBitmapContext();
- virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
- const SkClipStack&);
+ virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
virtual void DrawToContext(CGContextRef context, int x, int y,
const CGRect* src_rect);
diff --git a/skia/ext/bitmap_platform_device_mac_unittest.cc b/skia/ext/bitmap_platform_device_mac_unittest.cc
index dfd1360..3330440 100644
--- a/skia/ext/bitmap_platform_device_mac_unittest.cc
+++ b/skia/ext/bitmap_platform_device_mac_unittest.cc
@@ -9,7 +9,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkRegion.h"
-#include "third_party/skia/include/core/SkClipStack.h"
namespace skia {
@@ -30,12 +29,11 @@ TEST_F(BitmapPlatformDeviceMacTest, ClipRectTransformWithTranslate) {
SkMatrix transform;
transform.setTranslate(50, 140);
- SkClipStack ignore;
SkRegion clip_region;
SkIRect rect;
rect.set(0, 0, kWidth, kHeight);
clip_region.setRect(rect);
- bitmap_->setMatrixClip(transform, clip_region, ignore);
+ bitmap_->setMatrixClip(transform, clip_region);
CGContextRef context = bitmap_->GetBitmapContext();
SkRect clip_rect = gfx::CGRectToSkRect(CGContextGetClipBoundingBox(context));
@@ -50,12 +48,11 @@ TEST_F(BitmapPlatformDeviceMacTest, ClipRectTransformWithScale) {
SkMatrix transform;
transform.setScale(0.5, 0.5);
- SkClipStack unused;
SkRegion clip_region;
SkIRect rect;
rect.set(0, 0, kWidth, kHeight);
clip_region.setRect(rect);
- bitmap_->setMatrixClip(transform, clip_region, unused);
+ bitmap_->setMatrixClip(transform, clip_region);
CGContextRef context = bitmap_->GetBitmapContext();
SkRect clip_rect = gfx::CGRectToSkRect(CGContextGetClipBoundingBox(context));
diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc
index c812e84..3d407f0f 100644
--- a/skia/ext/bitmap_platform_device_win.cc
+++ b/skia/ext/bitmap_platform_device_win.cc
@@ -206,8 +206,7 @@ HDC BitmapPlatformDevice::getBitmapDC() {
}
void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform,
- const SkRegion& region,
- const SkClipStack&) {
+ const SkRegion& region) {
data_->SetMatrixClip(transform, region);
}
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index 87a2e1d0..ffaad81 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -79,8 +79,7 @@ class BitmapPlatformDevice : public PlatformDevice {
// Loads the given transform and clipping region into the HDC. This is
// overridden from SkDevice.
- virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
- const SkClipStack&);
+ virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect);
virtual void makeOpaque(int x, int y, int width, int height);
diff --git a/skia/ext/vector_platform_device_linux.cc b/skia/ext/vector_platform_device_linux.cc
index 068ae89..39dca8b 100644
--- a/skia/ext/vector_platform_device_linux.cc
+++ b/skia/ext/vector_platform_device_linux.cc
@@ -484,8 +484,7 @@ void VectorPlatformDevice::drawVertices(const SkDraw& draw,
}
void VectorPlatformDevice::setMatrixClip(const SkMatrix& transform,
- const SkRegion& region,
- const SkClipStack&) {
+ const SkRegion& region) {
clip_region_ = region;
if (!clip_region_.isEmpty())
LoadClipRegion(clip_region_);
diff --git a/skia/ext/vector_platform_device_linux.h b/skia/ext/vector_platform_device_linux.h
index 222f68f..8504e60 100644
--- a/skia/ext/vector_platform_device_linux.h
+++ b/skia/ext/vector_platform_device_linux.h
@@ -79,8 +79,7 @@ class VectorPlatformDevice : public PlatformDevice {
virtual void drawDevice(const SkDraw& draw, SkDevice*, int x, int y,
const SkPaint&) OVERRIDE;
- virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
- const SkClipStack&);
+ virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
virtual PlatformSurface beginPlatformPaint();
virtual bool IsVectorial();
diff --git a/skia/ext/vector_platform_device_win.cc b/skia/ext/vector_platform_device_win.cc
index 2476152..6ec4e39 100644
--- a/skia/ext/vector_platform_device_win.cc
+++ b/skia/ext/vector_platform_device_win.cc
@@ -415,8 +415,7 @@ bool VectorPlatformDevice::ApplyPaint(const SkPaint& paint) {
}
void VectorPlatformDevice::setMatrixClip(const SkMatrix& transform,
- const SkRegion& region,
- const SkClipStack&) {
+ const SkRegion& region) {
transform_ = transform;
LoadTransformToDC(hdc_, transform_);
clip_region_ = region;
diff --git a/skia/ext/vector_platform_device_win.h b/skia/ext/vector_platform_device_win.h
index 6045f24..3050a90 100644
--- a/skia/ext/vector_platform_device_win.h
+++ b/skia/ext/vector_platform_device_win.h
@@ -76,8 +76,7 @@ class VectorPlatformDevice : public PlatformDevice {
const SkPaint&) OVERRIDE;
- virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
- const SkClipStack&);
+ virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect);
virtual bool IsVectorial() { return true; }