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

Unified Diff: src/core/SkPictureImageGenerator.h

Issue 1240093004: SkPictureImageGenerator (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: added GM 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
Index: src/core/SkPictureImageGenerator.h
diff --git a/src/core/SkPictureImageGenerator.h b/src/core/SkPictureImageGenerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b0942efd0d6b60af07569383b37b27f842efdc5
--- /dev/null
+++ b/src/core/SkPictureImageGenerator.h
@@ -0,0 +1,34 @@
+/*
+ * 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*,
+ 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*);
+
+ SkAutoTUnref<const SkPicture> fPicture;
+ SkMatrix fMatrix;
+ SkTLazy<SkPaint> fPaint;
+
+ typedef SkImageGenerator INHERITED;
+};

Powered by Google App Engine
This is Rietveld 408576698