Index: src/pipe/SkPipeCanvas.h |
diff --git a/include/utils/SkNWayCanvas.h b/src/pipe/SkPipeCanvas.h |
similarity index 84% |
copy from include/utils/SkNWayCanvas.h |
copy to src/pipe/SkPipeCanvas.h |
index a4b9c594122e6d1a51e46c4f77d9db67a245fa5d..877ab6025b2aa366f903e0a94400e611b89edfe1 100644 |
--- a/include/utils/SkNWayCanvas.h |
+++ b/src/pipe/SkPipeCanvas.h |
@@ -1,36 +1,22 @@ |
- |
/* |
- * Copyright 2011 Google Inc. |
+ * Copyright 2016 Google Inc. |
* |
* Use of this source code is governed by a BSD-style license that can be |
* found in the LICENSE file. |
*/ |
-#ifndef SkNWayCanvas_DEFINED |
-#define SkNWayCanvas_DEFINED |
+#ifndef SkPipeCanvas_DEFINED |
+#define SkPipeCanvas_DEFINED |
-#include "../private/SkTDArray.h" |
#include "SkCanvas.h" |
+#include "SkWriteBuffer.h" |
-class SK_API SkNWayCanvas : public SkCanvas { |
+class SkPipeCanvas : public SkCanvas { |
public: |
- SkNWayCanvas(int width, int height); |
- virtual ~SkNWayCanvas(); |
- |
- virtual void addCanvas(SkCanvas*); |
- virtual void removeCanvas(SkCanvas*); |
- virtual void removeAll(); |
- |
- /////////////////////////////////////////////////////////////////////////// |
- // These are forwarded to the N canvases we're referencing |
- |
-#ifdef SK_SUPPORT_LEGACY_DRAWFILTER |
- SkDrawFilter* setDrawFilter(SkDrawFilter*) override; |
-#endif |
+ SkPipeCanvas(int width, int height, SkWStream*); |
+ ~SkPipeCanvas() override; |
protected: |
- SkTDArray<SkCanvas*> fList; |
- |
void willSave() override; |
SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; |
void willRestore() override; |
@@ -64,11 +50,13 @@ protected: |
void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; |
void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, |
SrcRectConstraint) override; |
+ void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, |
+ const SkPaint*) override; |
void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; |
void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, |
const SkPaint*, SrcRectConstraint) override; |
- void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, |
- const SkPaint*) override; |
+ void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst, |
+ const SkPaint*) override; |
void onDrawVertices(VertexMode vmode, int vertexCount, |
const SkPoint vertices[], const SkPoint texs[], |
const SkColor colors[], SkXfermode* xmode, |
@@ -83,9 +71,11 @@ protected: |
void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; |
void onDrawAnnotation(const SkRect&, const char[], SkData*) override; |
- class Iter; |
- |
private: |
+ void writeVerb(int); |
+ |
+ SkWStream* fStream; |
+ |
typedef SkCanvas INHERITED; |
}; |