diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 00:52:32 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 00:52:32 +0000 |
commit | 4008f80a0b75ed761a77dc539cda0de1a51f3223 (patch) | |
tree | dc64f4efc7da30b5241032a74ef3702eecd8a455 /skia | |
parent | 4a20d63ab03d4a01fae68f4a33f751c9d5892c51 (diff) | |
download | chromium_src-4008f80a0b75ed761a77dc539cda0de1a51f3223.zip chromium_src-4008f80a0b75ed761a77dc539cda0de1a51f3223.tar.gz chromium_src-4008f80a0b75ed761a77dc539cda0de1a51f3223.tar.bz2 |
roll skia 636:673
I need r666 (r667 and r668 are build fixes for r666. r673 fixes a regression that was introduced in r637 – found by the chromium trybots).
Some code changes required due to r637, which changed the signature of a pure virtual method and the signatures of several non-virtual methods. I added OVERRIDEs on windows to let this be a compile error in the future.
I also added SkBitmapCache.h/cpp to the gyp file which was added in r655. SkGradientShader depends on this.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6081006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/bitmap_platform_device_linux.cc | 3 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_linux.h | 3 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_mac.cc | 3 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_mac.h | 3 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_win.cc | 3 | ||||
-rw-r--r-- | skia/ext/bitmap_platform_device_win.h | 3 | ||||
-rw-r--r-- | skia/ext/platform_device_linux.cc | 3 | ||||
-rw-r--r-- | skia/ext/platform_device_mac.cc | 3 | ||||
-rw-r--r-- | skia/ext/platform_device_win.cc | 2 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_linux.cc | 8 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_linux.h | 8 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_win.cc | 8 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_win.h | 33 | ||||
-rw-r--r-- | skia/skia.gyp | 2 |
14 files changed, 57 insertions, 28 deletions
diff --git a/skia/ext/bitmap_platform_device_linux.cc b/skia/ext/bitmap_platform_device_linux.cc index 034d6bd..4164d93 100644 --- a/skia/ext/bitmap_platform_device_linux.cc +++ b/skia/ext/bitmap_platform_device_linux.cc @@ -37,7 +37,8 @@ void LoadClipToContext(cairo_t* context, const SkRegion& clip) { } // namespace -SkDevice* BitmapPlatformDeviceFactory::newDevice(SkBitmap::Config config, +SkDevice* BitmapPlatformDeviceFactory::newDevice(SkCanvas* ignored, + SkBitmap::Config config, int width, int height, bool isOpaque, bool isForLayer) { diff --git a/skia/ext/bitmap_platform_device_linux.h b/skia/ext/bitmap_platform_device_linux.h index 27109e3..7eda357 100644 --- a/skia/ext/bitmap_platform_device_linux.h +++ b/skia/ext/bitmap_platform_device_linux.h @@ -45,7 +45,8 @@ namespace skia { class BitmapPlatformDeviceFactory : public SkDeviceFactory { public: - virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height, + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, + int width, int height, bool isOpaque, bool isForLayer); }; diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc index bb7edc6..8435dbe 100644 --- a/skia/ext/bitmap_platform_device_mac.cc +++ b/skia/ext/bitmap_platform_device_mac.cc @@ -49,7 +49,8 @@ static CGContextRef CGContextForData(void* data, int width, int height) { } // namespace -SkDevice* BitmapPlatformDeviceFactory::newDevice(SkBitmap::Config config, +SkDevice* BitmapPlatformDeviceFactory::newDevice(SkCanvas* ignored, + SkBitmap::Config config, int width, int height, bool isOpaque, bool isForLayer) { diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h index 484d923..20d8918 100644 --- a/skia/ext/bitmap_platform_device_mac.h +++ b/skia/ext/bitmap_platform_device_mac.h @@ -12,7 +12,8 @@ namespace skia { class BitmapPlatformDeviceFactory : public SkDeviceFactory { public: - virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height, + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, + int width, int height, bool isOpaque, bool isForLayer); }; diff --git a/skia/ext/bitmap_platform_device_win.cc b/skia/ext/bitmap_platform_device_win.cc index b7ad13f..3d407f0f 100644 --- a/skia/ext/bitmap_platform_device_win.cc +++ b/skia/ext/bitmap_platform_device_win.cc @@ -15,7 +15,8 @@ namespace skia { -SkDevice* BitmapPlatformDeviceFactory::newDevice(SkBitmap::Config config, +SkDevice* BitmapPlatformDeviceFactory::newDevice(SkCanvas* ignored, + SkBitmap::Config config, int width, int height, bool isOpaque, bool isForLayer) { diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h index af402f4..ffaad81 100644 --- a/skia/ext/bitmap_platform_device_win.h +++ b/skia/ext/bitmap_platform_device_win.h @@ -12,7 +12,8 @@ namespace skia { class BitmapPlatformDeviceFactory : public SkDeviceFactory { public: - virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height, + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, + int width, int height, bool isOpaque, bool isForLayer); }; diff --git a/skia/ext/platform_device_linux.cc b/skia/ext/platform_device_linux.cc index 3cdf6e88..46b5350 100644 --- a/skia/ext/platform_device_linux.cc +++ b/skia/ext/platform_device_linux.cc @@ -6,7 +6,8 @@ namespace skia { -PlatformDevice::PlatformDevice(const SkBitmap& bitmap) : SkDevice(bitmap) { +PlatformDevice::PlatformDevice(const SkBitmap& bitmap) + : SkDevice(NULL, bitmap, /*isForLayer=*/false) { } } // namespace skia diff --git a/skia/ext/platform_device_mac.cc b/skia/ext/platform_device_mac.cc index 42927cc..31f0d19 100644 --- a/skia/ext/platform_device_mac.cc +++ b/skia/ext/platform_device_mac.cc @@ -32,7 +32,8 @@ bool constrain(int available_size, int* position, int *size) { } // namespace -PlatformDevice::PlatformDevice(const SkBitmap& bitmap) : SkDevice(bitmap) { +PlatformDevice::PlatformDevice(const SkBitmap& bitmap) + : SkDevice(NULL, bitmap, /*isForLayer=*/false) { } // Set up the CGContextRef for peaceful coexistence with Skia diff --git a/skia/ext/platform_device_win.cc b/skia/ext/platform_device_win.cc index 7bb5bd9..039de33 100644 --- a/skia/ext/platform_device_win.cc +++ b/skia/ext/platform_device_win.cc @@ -13,7 +13,7 @@ namespace skia { PlatformDevice::PlatformDevice(const SkBitmap& bitmap) - : SkDevice(bitmap) { + : SkDevice(NULL, bitmap, /*isForLayer=*/false) { } // static diff --git a/skia/ext/vector_platform_device_linux.cc b/skia/ext/vector_platform_device_linux.cc index 8f5be43..39dca8b 100644 --- a/skia/ext/vector_platform_device_linux.cc +++ b/skia/ext/vector_platform_device_linux.cc @@ -68,7 +68,8 @@ bool IsContextValid(cairo_t* context) { namespace skia { -SkDevice* VectorPlatformDeviceFactory::newDevice(SkBitmap::Config config, +SkDevice* VectorPlatformDeviceFactory::newDevice(SkCanvas* ignored, + SkBitmap::Config config, int width, int height, bool isOpaque, bool isForLayer) { @@ -139,6 +140,7 @@ PlatformDevice::PlatformSurface VectorPlatformDevice::beginPlatformPaint() { void VectorPlatformDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, + const SkIRect* srcRectOrNull, const SkMatrix& matrix, const SkPaint& paint) { SkASSERT(bitmap.getConfig() == SkBitmap::kARGB_8888_Config); @@ -185,7 +187,9 @@ void VectorPlatformDevice::drawPaint(const SkDraw& draw, void VectorPlatformDevice::drawPath(const SkDraw& draw, const SkPath& path, - const SkPaint& paint) { + const SkPaint& paint, + const SkMatrix* prePathMatrix, + bool pathIsMutable) { if (paint.getPathEffect()) { // Apply the path effect forehand. SkPath path_modified; diff --git a/skia/ext/vector_platform_device_linux.h b/skia/ext/vector_platform_device_linux.h index 1cf8a0c..6bed270 100644 --- a/skia/ext/vector_platform_device_linux.h +++ b/skia/ext/vector_platform_device_linux.h @@ -14,7 +14,8 @@ namespace skia { class VectorPlatformDeviceFactory : public SkDeviceFactory { public: - virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height, + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, + int width, int height, bool isOpaque, bool isForLayer); static SkDevice* CreateDevice(cairo_t* context, int width, int height, @@ -40,12 +41,15 @@ class VectorPlatformDevice : public PlatformDevice { // We translate following skia APIs into corresponding Cairo APIs. virtual void drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, + const SkIRect* srcRectOrNull, const SkMatrix& matrix, const SkPaint& paint); virtual void drawDevice(const SkDraw& draw, SkDevice*, int x, int y, const SkPaint&); virtual void drawPaint(const SkDraw& draw, const SkPaint& paint); virtual void drawPath(const SkDraw& draw, const SkPath& path, - const SkPaint& paint); + const SkPaint& paint, + const SkMatrix* prePathMatrix = NULL, + bool pathIsMutable = false); virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, size_t count, const SkPoint[], const SkPaint& paint); virtual void drawPosText(const SkDraw& draw, const void* text, size_t len, diff --git a/skia/ext/vector_platform_device_win.cc b/skia/ext/vector_platform_device_win.cc index d9bb8b4..31ac722 100644 --- a/skia/ext/vector_platform_device_win.cc +++ b/skia/ext/vector_platform_device_win.cc @@ -12,7 +12,8 @@ namespace skia { -SkDevice* VectorPlatformDeviceFactory::newDevice(SkBitmap::Config config, +SkDevice* VectorPlatformDeviceFactory::newDevice(SkCanvas* unused, + SkBitmap::Config config, int width, int height, bool isOpaque, bool isForLayer) { @@ -202,7 +203,9 @@ void VectorPlatformDevice::drawRect(const SkDraw& draw, void VectorPlatformDevice::drawPath(const SkDraw& draw, const SkPath& path, - const SkPaint& paint) { + const SkPaint& paint, + const SkMatrix* prePathMatrix, + bool pathIsMutable) { if (paint.getPathEffect()) { // Apply the path effect forehand. SkPath path_modified; @@ -247,6 +250,7 @@ void VectorPlatformDevice::drawPath(const SkDraw& draw, void VectorPlatformDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, + const SkIRect* srcRectOrNull, const SkMatrix& matrix, const SkPaint& paint) { // Load the temporary matrix. This is what will translate, rotate and resize diff --git a/skia/ext/vector_platform_device_win.h b/skia/ext/vector_platform_device_win.h index 14b33e5..2a5057e 100644 --- a/skia/ext/vector_platform_device_win.h +++ b/skia/ext/vector_platform_device_win.h @@ -6,6 +6,7 @@ #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_WIN_H_ #pragma once +#include "base/compiler_specific.h" #include "skia/ext/platform_device.h" #include "third_party/skia/include/core/SkMatrix.h" #include "third_party/skia/include/core/SkRegion.h" @@ -14,8 +15,9 @@ namespace skia { class VectorPlatformDeviceFactory : public SkDeviceFactory { public: - virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height, - bool isOpaque, bool isForLayer); + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, + int width, int height, + bool isOpaque, bool isForLayer) OVERRIDE; static SkDevice* CreateDevice(int width, int height, bool isOpaque, HANDLE shared_section); }; @@ -40,33 +42,38 @@ class VectorPlatformDevice : public PlatformDevice { return hdc_; } - virtual void drawPaint(const SkDraw& draw, const SkPaint& paint); + virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) OVERRIDE; virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, - size_t count, const SkPoint[], const SkPaint& paint); + size_t count, const SkPoint[], + const SkPaint& paint) OVERRIDE; virtual void drawRect(const SkDraw& draw, const SkRect& r, - const SkPaint& paint); + const SkPaint& paint) OVERRIDE; virtual void drawPath(const SkDraw& draw, const SkPath& path, - const SkPaint& paint); + const SkPaint& paint, + const SkMatrix* prePathMatrix = NULL, + bool pathIsMutable = false) OVERRIDE; virtual void drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint); + const SkIRect* srcRectOrNull, + const SkMatrix& matrix, + const SkPaint& paint) OVERRIDE; virtual void drawSprite(const SkDraw& draw, const SkBitmap& bitmap, - int x, int y, const SkPaint& paint); + int x, int y, const SkPaint& paint) OVERRIDE; virtual void drawText(const SkDraw& draw, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint& paint); + SkScalar x, SkScalar y, const SkPaint& paint) OVERRIDE; virtual void drawPosText(const SkDraw& draw, const void* text, size_t len, const SkScalar pos[], SkScalar constY, - int scalarsPerPos, const SkPaint& paint); + int scalarsPerPos, const SkPaint& paint) OVERRIDE; virtual void drawTextOnPath(const SkDraw& draw, const void* text, size_t len, const SkPath& path, const SkMatrix* matrix, - const SkPaint& paint); + const SkPaint& paint) OVERRIDE; virtual void drawVertices(const SkDraw& draw, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint& paint); + const SkPaint& paint) OVERRIDE; virtual void drawDevice(const SkDraw& draw, SkDevice*, int x, int y, - const SkPaint&); + const SkPaint&) OVERRIDE; virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region); diff --git a/skia/skia.gyp b/skia/skia.gyp index d5382d1..c08f405 100644 --- a/skia/skia.gyp +++ b/skia/skia.gyp @@ -302,6 +302,8 @@ '../third_party/skia/src/effects/Sk1DPathEffect.cpp', '../third_party/skia/src/effects/Sk2DPathEffect.cpp', '../third_party/skia/src/effects/SkAvoidXfermode.cpp', + '../third_party/skia/src/effects/SkBitmapCache.cpp', + '../third_party/skia/src/effects/SkBitmapCache.h', '../third_party/skia/src/effects/SkBlurDrawLooper.cpp', '../third_party/skia/src/effects/SkBlurMask.cpp', '../third_party/skia/src/effects/SkBlurMask.h', |