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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1829303002: move setshader to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: addressing comments from #8 Created 4 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
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 0054143a9aa5cb561f9094b51ee03493c1cffb54..b6a5b519e8d0f45493d2987f6ce073f442814f90 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1983,7 +1983,7 @@ void SkPDFDevice::populateGraphicStateEntryFromPaint(
// PDF treats a shader as a color, so we only set one or the other.
sk_sp<SkPDFObject> pdfShader;
- const SkShader* shader = paint.getShader();
+ SkShader* shader = paint.getShader();
SkColor color = paint.getColor();
if (shader) {
// PDF positions patterns relative to the initial transform, so
@@ -2005,7 +2005,7 @@ void SkPDFDevice::populateGraphicStateEntryFromPaint(
SkScalar rasterScale =
SkIntToScalar(fRasterDpi) / DPI_FOR_RASTER_SCALE_ONE;
pdfShader.reset(SkPDFShader::GetPDFShader(
- fDocument, fRasterDpi, *shader, transform, bounds, rasterScale));
+ fDocument, fRasterDpi, shader, transform, bounds, rasterScale));
if (pdfShader.get()) {
// pdfShader has been canonicalized so we can directly compare
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698