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

Unified Diff: src/utils/android/SkAndroidSDKCanvas.h

Issue 1536013003: Move SkAndroidSDKCanvas to tools and ensure that it is built on all Android builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « gyp/utils.gyp ('k') | src/utils/android/SkAndroidSDKCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/android/SkAndroidSDKCanvas.h
diff --git a/src/utils/android/SkAndroidSDKCanvas.h b/src/utils/android/SkAndroidSDKCanvas.h
deleted file mode 100644
index d8ee0ed216728376289bdaf1e85d4680d3e67b0c..0000000000000000000000000000000000000000
--- a/src/utils/android/SkAndroidSDKCanvas.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkAndroidSDKCanvas_DEFINED
-#define SkAndroidSDKCanvas_DEFINED
-
-#include "SkBitmap.h"
-#include "SkCanvas.h"
-#include "SkPaint.h"
-#include "SkPath.h"
-#include "SkRect.h"
-
-/** SkDrawFilter is likely to be deprecated; this is a proxy
- canvas that does the same thing: alter SkPaint fields.
-
- onDraw*() functions may have their SkPaint modified, and are then
- passed on to the same function on proxyTarget. THIS BREAKS CONSTNESS!
-
- This still suffers one of the same architectural flaws as SkDrawFilter:
- TextBlob paints are incomplete when filter is called.
-*/
-
-class SkAndroidSDKCanvas : public SkCanvas {
-public:
- SkAndroidSDKCanvas();
- void reset(SkCanvas* newTarget);
-
-protected:
-
- // FILTERING
-
- void onDrawPaint(const SkPaint& paint) override;
- void onDrawPoints(PointMode pMode, size_t count, const SkPoint pts[],
- const SkPaint& paint) override;
- void onDrawOval(const SkRect& r, const SkPaint& paint) override;
- void onDrawRect(const SkRect& r, const SkPaint& paint) override;
- void onDrawRRect(const SkRRect& r, const SkPaint& paint) override;
- void onDrawPath(const SkPath& path, const SkPaint& paint) override;
- void onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
- const SkPaint* paint) override;
- void onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
- const SkPaint* paint, SkCanvas::SrcRectConstraint) override;
- void onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
- const SkRect& dst, const SkPaint* paint) override;
- void onDrawVertices(VertexMode vMode, int vertexCount, const SkPoint vertices[],
- const SkPoint texs[], const SkColor colors[], SkXfermode* xMode,
- const uint16_t indices[], int indexCount,
- const SkPaint& paint) override;
-
- void onDrawDRRect(const SkRRect& outer, const SkRRect& inner,
- const SkPaint& paint) override;
-
- void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
- const SkPaint& paint) override;
- void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[],
- const SkPaint& paint) override;
- void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
- SkScalar constY, const SkPaint& paint) override;
- void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
- const SkMatrix* matrix, const SkPaint& paint) override;
- void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
- const SkPaint& paint) override;
-
- void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
- const SkPoint texCoords[4], SkXfermode* xmode,
- const SkPaint& paint) override;
-
- void onDrawImage(const SkImage*, SkScalar, SkScalar, const SkPaint*) override;
- void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*,
- SrcRectConstraint) override;
- void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*);
- void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[],
- const SkColor[], int count, SkXfermode::Mode,
- const SkRect* cull, const SkPaint*) override;
- void onDrawImageNine(const SkImage*, const SkIRect& center,
- const SkRect& dst, const SkPaint*) override;
-
- // PASS THROUGH
-
- void onDrawDrawable(SkDrawable*, const SkMatrix*) override;
- SkISize getBaseLayerSize() const override;
- bool getClipBounds(SkRect*) const override;
- bool getClipDeviceBounds(SkIRect*) const override;
- bool isClipEmpty() const override;
- bool isClipRect() const override;
- SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override;
- bool onPeekPixels(SkPixmap*) override;
- bool onAccessTopLayerPixels(SkPixmap*) override;
- void willSave() override;
- SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;
- void willRestore() override;
- void didRestore() override;
- void didConcat(const SkMatrix&) override;
- void didSetMatrix(const SkMatrix&) override;
- void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override;
- void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override;
- void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override;
- void onClipRegion(const SkRegion&, SkRegion::Op) override;
- void onDiscard() override;
-
-protected:
- SkCanvas* fProxyTarget;
-};
-
-#endif // SkAndroidSDKCanvas_DEFINED
-
« no previous file with comments | « gyp/utils.gyp ('k') | src/utils/android/SkAndroidSDKCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698