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

Unified Diff: src/core/SkShader.cpp

Issue 221923007: Initial picture shader implementation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Win build fix + SkShader factory. Created 6 years, 9 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
« src/core/SkPictureShader.cpp ('K') | « src/core/SkPictureShader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 31b208e2ccdfc609ffc3129fa182333bc83f0af4..db941ee6132aff39b7e862c768b6a53df25749eb 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -9,6 +9,8 @@
#include "SkReadBuffer.h"
#include "SkMallocPixelRef.h"
#include "SkPaint.h"
+#include "SkPicture.h"
+#include "SkPictureShader.h"
#include "SkScalar.h"
#include "SkShader.h"
#include "SkWriteBuffer.h"
@@ -179,6 +181,10 @@ SkShader* SkShader::CreateBitmapShader(const SkBitmap& src,
return ::CreateBitmapShader(src, tmx, tmy, NULL);
}
robertphillips 2014/04/02 18:15:35 This seems a bit odd since we're taking a ref on s
+SkShader* SkShader::CreatePictureShader(SkPicture& src, TileMode tmx, TileMode tmy) {
+ return SkNEW_ARGS(SkPictureShader, (&src, tmx, tmy));
+}
+
#ifndef SK_IGNORE_TO_STRING
void SkShader::toString(SkString* str) const {
if (this->hasLocalMatrix()) {
« src/core/SkPictureShader.cpp ('K') | « src/core/SkPictureShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698