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

Unified Diff: src/core/SkPictureImageGenerator.h

Issue 1240093004: SkPictureImageGenerator (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/core/SkImageGenerator.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureImageGenerator.h
diff --git a/src/core/SkPictureImageGenerator.h b/src/core/SkPictureImageGenerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef8ad361ff2fc7cb4ec7d041e7e6d5c36187258e
--- /dev/null
+++ b/src/core/SkPictureImageGenerator.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkImageGenerator.h"
+
+#include "SkMatrix.h"
+#include "SkPaint.h"
+#include "SkRefCnt.h"
+#include "SkTLazy.h"
+
+class SkPicture;
+
+class SkPictureImageGenerator : SkImageGenerator {
+public:
+ static SkImageGenerator* create(const SkISize&, const SkPicture*, const SkMatrix*,
reed1 2015/07/17 18:25:42 Create
f(malita) 2015/07/17 18:39:01 Done.
+ const SkPaint*);
+
+protected:
+ bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[],
+ int* ctableCount) override;
+
+private:
+ SkPictureImageGenerator(const SkISize&, const SkPicture*, const SkMatrix*, const SkPaint*);
+
+ const SkImageInfo fInfo;
+ SkAutoTUnref<const SkPicture> fPicture;
+ SkTLazy<SkMatrix> fMatrix;
reed1 2015/07/17 18:25:42 No real reason to make matrix lazy -- it could jus
f(malita) 2015/07/17 18:39:01 Done.
+ SkTLazy<SkPaint> fPaint;
+
+ typedef SkImageGenerator INHERITED;
+};
« no previous file with comments | « src/core/SkImageGenerator.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698