Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: include/core/SkCanvasSimplifier.h

Issue 24615006: rebaseline drawbitmap gms (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove expectation included by mistake in another cl Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/core/SkCanvasSimplifier.h
diff --git a/include/core/SkCanvasSimplifier.h b/include/core/SkCanvasSimplifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..2048e93e0b07eccb26ebdbe0d00d1a6631513f16
--- /dev/null
+++ b/include/core/SkCanvasSimplifier.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+#ifndef SkCanvasSimplifier_DEFINED
+#define SkCanvasSimplifier_DEFINED
+
+#include "SkCanvas.h"
+
+class SkCanvasSimplifier : public SkCanvas {
reed1 2013/09/26 17:00:46 1. Some dox for what this class does 2. Does it ne
edisonn 2013/09/26 19:44:09 added a few lines of doc
+public:
+ SK_DECLARE_INST_COUNT(SkCanvasSimplifier)
+
+ SkCanvasSimplifier();
+
+ /** Construct a canvas with the specified device to draw into.
+ @param device Specifies a device for the canvas to draw into.
+ */
+ explicit SkCanvasSimplifier(SkBaseDevice* device);
+
+ virtual ~SkCanvasSimplifier();
+
+ virtual int save(SaveFlags flags = kMatrixClip_SaveFlag);
+
+ virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
+ SaveFlags flags = kARGB_ClipLayer_SaveFlag);
+
+ virtual void restore();
+
+ virtual bool isDrawingToLayer() const;
+
+ virtual bool translate(SkScalar dx, SkScalar dy);
+
+ virtual bool scale(SkScalar sx, SkScalar sy);
+
+ virtual bool rotate(SkScalar degrees);
+
+ virtual bool skew(SkScalar sx, SkScalar sy);
+
+ virtual bool concat(const SkMatrix& matrix);
+
+ virtual void setMatrix(const SkMatrix& matrix);
+
+ virtual bool clipRect(const SkRect& rect,
+ SkRegion::Op op = SkRegion::kIntersect_Op,
+ bool doAntiAlias = false);
+
+ virtual bool clipRRect(const SkRRect& rrect,
+ SkRegion::Op op = SkRegion::kIntersect_Op,
+ bool doAntiAlias = false);
+
+ virtual bool clipPath(const SkPath& path,
+ SkRegion::Op op = SkRegion::kIntersect_Op,
+ bool doAntiAlias = false);
+
+ virtual bool clipRegion(const SkRegion& deviceRgn,
+ SkRegion::Op op = SkRegion::kIntersect_Op);
+
+ virtual void clear(SkColor);
+
+ virtual void drawPaint(const SkPaint& paint);
+
+ virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
+ const SkPaint& paint);
+
+ virtual void drawRect(const SkRect& rect, const SkPaint& paint);
+
+ virtual void drawOval(const SkRect& oval, const SkPaint&);
+
+ virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint);
+
+ virtual void drawPath(const SkPath& path, const SkPaint& paint);
+
+ virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
+ const SkPaint* paint = NULL);
+
+ virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
+ const SkRect& dst,
+ const SkPaint* paint = NULL,
+ DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag);
+
+ virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
+ const SkPaint* paint = NULL);
+
+ virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
+ const SkRect& dst, const SkPaint* paint = NULL);
+
+ virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
+ const SkPaint* paint = NULL);
+
+
+ virtual void drawText(const void* text, size_t byteLength, SkScalar x,
+ SkScalar y, const SkPaint& paint);
+
+ virtual void drawPosText(const void* text, size_t byteLength,
+ const SkPoint pos[], const SkPaint& paint);
+
+ virtual void drawPosTextH(const void* text, size_t byteLength,
+ const SkScalar xpos[], SkScalar constY,
+ const SkPaint& paint);
+
+ virtual void drawTextOnPath(const void* text, size_t byteLength,
+ const SkPath& path, const SkMatrix* matrix,
+ const SkPaint& paint);
+
+ virtual void drawPicture(SkPicture& picture);
+
+ virtual void drawVertices(VertexMode vmode, int vertexCount,
+ const SkPoint vertices[], const SkPoint texs[],
+ const SkColor colors[], SkXfermode* xmode,
+ const uint16_t indices[], int indexCount,
+ const SkPaint& paint);
+
+
+ virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter);
+
+
+private:
+ typedef SkCanvas INHERITED;
+};
+
+#endif // SkCanvasSimplifier_DEFINED
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkDocument.h » ('j') | include/core/SkDocument.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698