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

Unified Diff: src/core/SkDeduper.h

Issue 2201323003: add pipecanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add test for writeImage Created 4 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: src/core/SkDeduper.h
diff --git a/src/core/SkDeduper.h b/src/core/SkDeduper.h
new file mode 100644
index 0000000000000000000000000000000000000000..f82f4fd8c268e3cc7c67712d60067c77c5c40023
--- /dev/null
+++ b/src/core/SkDeduper.h
@@ -0,0 +1,39 @@
+/*
+ * 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 SkDeduper_DEFINED
+#define SkDeduper_DEFINED
+
+#include "SkTypes.h"
+
+class SkImage;
+class SkPicture;
+class SkTypeface;
+
+class SkDeduper {
+public:
+ virtual ~SkDeduper() {}
+
+ // These return 0 on failure
+
+ virtual int findOrDefineImage(SkImage*) = 0;
+ virtual int findOrDefinePicture(SkPicture*) = 0;
+ virtual int findOrDefineTypeface(SkTypeface*) = 0;
+ virtual int findOrDefineFactory(SkFlattenable*) = 0;
+};
+
+class SkInflator {
+public:
+ virtual ~SkInflator() {}
+
+ virtual SkImage* getImage(int) = 0;
+ virtual SkPicture* getPicture(int) = 0;
+ virtual SkTypeface* getTypeface(int) = 0;
+ virtual SkFlattenable::Factory getFactory(int) = 0;
+};
+
+#endif
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/core/SkPipe.h » ('j') | src/core/SkPipe.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698