Skip to content
Snippets Groups Projects
Commit f756798f authored by thakis@chromium.org's avatar thakis@chromium.org
Browse files

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

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70693

Review URL: http://codereview.chromium.org/6081006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70835 0039d316-1c4b-4281-b951-d872f2087c98
parent d93d833f
No related merge requests found
Showing
with 454 additions and 29 deletions
......@@ -5,7 +5,7 @@ vars = {
"webkit_trunk": "http://svn.webkit.org/repository/webkit/trunk",
"nacl_trunk": "http://src.chromium.org/native_client/trunk",
"webkit_revision": "75250",
"skia_revision": "636",
"skia_revision": "673",
"chromium_git": "http://git.chromium.org/git",
"swig_revision": "69281",
"nacl_revision": "4085",
......
......@@ -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) {
......
......@@ -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);
};
......
......@@ -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) {
......
......@@ -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);
};
......
......@@ -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) {
......
......@@ -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);
};
......
......@@ -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
......@@ -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
......
......@@ -13,7 +13,7 @@
namespace skia {
PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
: SkDevice(bitmap) {
: SkDevice(NULL, bitmap, /*isForLayer=*/false) {
}
// static
......
......@@ -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;
......
......@@ -18,7 +18,8 @@ class VectorPlatformDeviceFactory : public SkDeviceFactory {
bool isOpaque);
// Overridden from SkDeviceFactory:
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);
};
......@@ -47,12 +48,15 @@ class VectorPlatformDevice : public PlatformDevice {
virtual bool IsVectorial();
virtual PlatformSurface beginPlatformPaint();
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,
......
......@@ -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
......
......@@ -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);
......
......@@ -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',
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment