зеркало из https://github.com/mozilla/moz-skia.git
add SK_OVERRIDE, move subclass impls of virtuals into .cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@2823 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
8e6d914b87
Коммит
982cb875f0
|
@ -67,9 +67,7 @@ public:
|
|||
virtual bool endSheet();
|
||||
virtual bool endPortfolio();
|
||||
|
||||
virtual uint32_t getDeviceCapabilities() SK_OVERRIDE {
|
||||
return kVector_Capability;
|
||||
}
|
||||
virtual uint32_t getDeviceCapabilities() SK_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual void clear(SkColor color) SK_OVERRIDE;
|
||||
|
@ -144,9 +142,7 @@ protected:
|
|||
virtual bool onReadPixels(const SkBitmap& bitmap,
|
||||
int x,
|
||||
int y,
|
||||
SkCanvas::Config8888) SK_OVERRIDE {
|
||||
return false;
|
||||
}
|
||||
SkCanvas::Config8888) SK_OVERRIDE;
|
||||
|
||||
private:
|
||||
class TypefaceUse : ::SkNoncopyable {
|
||||
|
|
|
@ -62,43 +62,43 @@ public:
|
|||
const SkMatrix& initialTransform);
|
||||
SK_API virtual ~SkPDFDevice();
|
||||
|
||||
virtual uint32_t getDeviceCapabilities() { return kVector_Capability; }
|
||||
virtual uint32_t getDeviceCapabilities() SK_OVERRIDE;
|
||||
|
||||
virtual void clear(SkColor color);
|
||||
virtual void clear(SkColor color) SK_OVERRIDE;
|
||||
|
||||
/** These are called inside the per-device-layer loop for each draw call.
|
||||
When these are called, we have already applied any saveLayer operations,
|
||||
and are handling any looping from the paint, and any effects from the
|
||||
DrawFilter.
|
||||
*/
|
||||
virtual void drawPaint(const SkDraw&, const SkPaint& paint);
|
||||
virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE;
|
||||
virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode,
|
||||
size_t count, const SkPoint[],
|
||||
const SkPaint& paint);
|
||||
const SkPaint& paint) SK_OVERRIDE;
|
||||
virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint);
|
||||
virtual void drawPath(const SkDraw&, const SkPath& origpath,
|
||||
const SkPaint& paint, const SkMatrix* prePathMatrix,
|
||||
bool pathIsMutable);
|
||||
bool pathIsMutable) SK_OVERRIDE;
|
||||
virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap,
|
||||
const SkIRect* srcRectOrNull,
|
||||
const SkMatrix& matrix, const SkPaint& paint);
|
||||
const SkMatrix& matrix, const SkPaint&) SK_OVERRIDE;
|
||||
virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, int x, int y,
|
||||
const SkPaint& paint);
|
||||
const SkPaint& paint) SK_OVERRIDE;
|
||||
virtual void drawText(const SkDraw&, const void* text, size_t len,
|
||||
SkScalar x, SkScalar y, const SkPaint& paint);
|
||||
SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE;
|
||||
virtual void drawPosText(const SkDraw&, const void* text, size_t len,
|
||||
const SkScalar pos[], SkScalar constY,
|
||||
int scalarsPerPos, const SkPaint& paint);
|
||||
int scalarsPerPos, const SkPaint&) SK_OVERRIDE;
|
||||
virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len,
|
||||
const SkPath& path, const SkMatrix* matrix,
|
||||
const SkPaint& paint);
|
||||
const SkPaint& paint) SK_OVERRIDE;
|
||||
virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode,
|
||||
int vertexCount, const SkPoint verts[],
|
||||
const SkPoint texs[], const SkColor colors[],
|
||||
SkXfermode* xmode, const uint16_t indices[],
|
||||
int indexCount, const SkPaint& paint);
|
||||
int indexCount, const SkPaint& paint) SK_OVERRIDE;
|
||||
virtual void drawDevice(const SkDraw&, SkDevice*, int x, int y,
|
||||
const SkPaint&);
|
||||
const SkPaint&) SK_OVERRIDE;
|
||||
|
||||
enum DrawingArea {
|
||||
kContent_DrawingArea, // Drawing area for the page content.
|
||||
|
@ -158,12 +158,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual bool onReadPixels(const SkBitmap& bitmap,
|
||||
int x, int y,
|
||||
SkCanvas::Config8888) SK_OVERRIDE {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool onReadPixels(const SkBitmap& bitmap, int x, int y,
|
||||
SkCanvas::Config8888) SK_OVERRIDE;
|
||||
|
||||
private:
|
||||
// TODO(vandebo): push most of SkPDFDevice's state into a core object in
|
||||
|
@ -203,7 +199,7 @@ private:
|
|||
virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
|
||||
int width, int height,
|
||||
bool isOpaque,
|
||||
Usage usage);
|
||||
Usage usage) SK_OVERRIDE;
|
||||
|
||||
void init();
|
||||
void cleanUp(bool clearFontUsage);
|
||||
|
|
|
@ -1119,6 +1119,10 @@ HRESULT SkXPSDevice::createXpsQuad(const SkPoint (&points)[4],
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
uint32_t SkXPSDevice::getDeviceCapabilities() {
|
||||
return kVector_Capability;
|
||||
}
|
||||
|
||||
void SkXPSDevice::clear(SkColor color) {
|
||||
//TODO: override this for XPS
|
||||
SkDEBUGF(("XPS clear not yet implemented."));
|
||||
|
@ -2362,6 +2366,11 @@ void SkXPSDevice::drawDevice(const SkDraw& d, SkDevice* dev,
|
|||
"Could not add layer to current visuals.");
|
||||
}
|
||||
|
||||
bool SkXPSDevice::onReadPixels(const SkBitmap& bitmap, int x, int y,
|
||||
SkCanvas::Config8888) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SkDevice* SkXPSDevice::onCreateCompatibleDevice(SkBitmap::Config config,
|
||||
int width, int height,
|
||||
bool isOpaque,
|
||||
|
|
|
@ -562,6 +562,10 @@ void SkPDFDevice::cleanUp(bool clearFontUsage) {
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t SkPDFDevice::getDeviceCapabilities() {
|
||||
return kVector_Capability;
|
||||
}
|
||||
|
||||
void SkPDFDevice::clear(SkColor color) {
|
||||
this->cleanUp(true);
|
||||
this->init();
|
||||
|
@ -1522,3 +1526,8 @@ void SkPDFDevice::internalDrawBitmap(const SkMatrix& matrix,
|
|||
SkPDFUtils::DrawFormXObject(fXObjectResources.count() - 1,
|
||||
&content.entry()->fContent);
|
||||
}
|
||||
|
||||
bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y,
|
||||
SkCanvas::Config8888) {
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче