aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-16 21:59:11 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-16 21:59:11 +0000
commit0f03f43e44d94b3aaf679edc8a6a41de4012fdf5 (patch)
tree3da39f413daada9a494d78edf84c1f4adaa22505 /src/utils
parent145d1c0fdcef63991d7f910cc067a653a8aa2c4c (diff)
Move SkNoSaveLayerCanvas.h to include/utils
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkNoSaveLayerCanvas.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/utils/SkNoSaveLayerCanvas.h b/src/utils/SkNoSaveLayerCanvas.h
deleted file mode 100644
index 6b346845e2..0000000000
--- a/src/utils/SkNoSaveLayerCanvas.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkNoSaveLayerCanvas_DEFINED
-#define SkNoSaveLayerCanvas_DEFINED
-
-#include "SkCanvas.h"
-#include "SkRRect.h"
-
-// The NoSaveLayerCanvas is used to play back SkPictures when the saveLayer
-// functionality isn't required (e.g., during analysis of the draw calls).
-// It also simplifies the clipping calls to only use rectangles.
-class SkNoSaveLayerCanvas : public SkCanvas {
-public:
- SkNoSaveLayerCanvas(SkBaseDevice* device) : INHERITED(device) {}
-
-protected:
- virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags flags) SK_OVERRIDE {
- this->INHERITED::willSaveLayer(bounds, paint, flags);
- return kNoLayer_SaveLayerStrategy;
- }
-
- // disable aa for speed
- virtual void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle) SK_OVERRIDE {
- this->INHERITED::onClipRect(rect, op, kHard_ClipEdgeStyle);
- }
-
- // for speed, just respect the bounds, and disable AA. May give us a few
- // false positives and negatives.
- virtual void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle) SK_OVERRIDE {
- this->updateClipConservativelyUsingBounds(path.getBounds(), op,
- path.isInverseFillType());
- }
- virtual void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle) SK_OVERRIDE {
- this->updateClipConservativelyUsingBounds(rrect.getBounds(), op, false);
- }
-
-private:
- typedef SkCanvas INHERITED;
-};
-
-#endif // SkNoSaveLayerCanvas_DEFINED