| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SKIA_EXT_CDL_NO_DRAW_CANVAS_H_ |
| 9 #define SKIA_EXT_CDL_NO_DRAW_CANVAS_H_ |
| 10 |
| 11 #include "cdl_common.h" |
| 12 |
| 13 #if CDL_ENABLED |
| 14 |
| 15 #include "cdl_canvas.h" |
| 16 |
| 17 class SK_API CdlNoDrawCanvas : public CdlCanvas { |
| 18 public: |
| 19 CdlNoDrawCanvas(int width, int height); |
| 20 ~CdlNoDrawCanvas() override; |
| 21 |
| 22 protected: |
| 23 // TODO(cdl): Decide if we should skip computing clips at paint time. |
| 24 void onClipRect(const SkRect&, SkCanvas::ClipOp, ClipEdgeStyle) override {} |
| 25 void onClipRRect(const SkRRect&, SkCanvas::ClipOp, ClipEdgeStyle) override {} |
| 26 void onClipPath(const SkPath&, SkCanvas::ClipOp, ClipEdgeStyle) override {} |
| 27 void onClipRegion(const SkRegion&, SkCanvas::ClipOp) override {} |
| 28 |
| 29 void onDiscard() override {} |
| 30 |
| 31 void onDrawPaint(const CdlPaint&) override {} |
| 32 void onDrawPath(const SkPath&, const CdlPaint&) override {} |
| 33 void onDrawRect(const SkRect&, const CdlPaint&) override {} |
| 34 void onDrawRRect(const SkRRect&, const CdlPaint&) override {} |
| 35 void onDrawDRRect(const SkRRect&, const SkRRect&, const CdlPaint&) override {} |
| 36 void onDrawOval(const SkRect&, const CdlPaint&) override {} |
| 37 |
| 38 void onDrawPicture(const CdlPicture* picture, |
| 39 const SkMatrix* matrix, |
| 40 const CdlPaint* paint) override {} |
| 41 void onDrawAnnotation(const SkRect&, const char[], SkData*) override {} |
| 42 |
| 43 void onDrawText(const void*, |
| 44 size_t, |
| 45 SkScalar x, |
| 46 SkScalar y, |
| 47 const CdlPaint&) override {} |
| 48 void onDrawPosText(const void*, |
| 49 size_t, |
| 50 const SkPoint[], |
| 51 const CdlPaint&) override {} |
| 52 |
| 53 void onDrawTextBlob(const SkTextBlob*, |
| 54 SkScalar, |
| 55 SkScalar, |
| 56 const CdlPaint&) override {} |
| 57 |
| 58 void onDrawImage(const SkImage*, |
| 59 SkScalar, |
| 60 SkScalar, |
| 61 const CdlPaint*) override {} |
| 62 |
| 63 void onDrawImageRect(const SkImage*, |
| 64 const SkRect*, |
| 65 const SkRect&, |
| 66 const CdlPaint*, |
| 67 SkCanvas::SrcRectConstraint) override {} |
| 68 |
| 69 void onDrawPoints(SkCanvas::PointMode, |
| 70 size_t count, |
| 71 const SkPoint pts[], |
| 72 const CdlPaint&) override {} |
| 73 }; |
| 74 |
| 75 #else // CDL_ENABLED |
| 76 |
| 77 #include "third_party/skia/include/utils/SkNoDrawCanvas.h" |
| 78 |
| 79 #endif // CDL_ENABLED |
| 80 |
| 81 #endif // SKIA_EXT_CDL_NO_DRAW_CANVAS_H_ |
| OLD | NEW |