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

Side by Side Diff: src/pdf/SkPDFDevice.cpp

Issue 551463004: introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add new file Created 6 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 unified diff | Download patch
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/ports/SkImageDecoder_CG.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPDFDevice.h" 8 #include "SkPDFDevice.h"
9 9
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 // Canvas promises that this ptr is valid until onDetachFromCanvas is called 1254 // Canvas promises that this ptr is valid until onDetachFromCanvas is called
1255 fClipStack = canvas->getClipStack(); 1255 fClipStack = canvas->getClipStack();
1256 } 1256 }
1257 1257
1258 void SkPDFDevice::onDetachFromCanvas() { 1258 void SkPDFDevice::onDetachFromCanvas() {
1259 INHERITED::onDetachFromCanvas(); 1259 INHERITED::onDetachFromCanvas();
1260 1260
1261 fClipStack = NULL; 1261 fClipStack = NULL;
1262 } 1262 }
1263 1263
1264 SkSurface* SkPDFDevice::newSurface(const SkImageInfo& info) { 1264 SkSurface* SkPDFDevice::newSurface(const SkImageInfo& info, const SkSurfaceProps & props) {
1265 return SkSurface::NewRaster(info); 1265 return SkSurface::NewRaster(info, &props);
1266 } 1266 }
1267 1267
1268 ContentEntry* SkPDFDevice::getLastContentEntry() { 1268 ContentEntry* SkPDFDevice::getLastContentEntry() {
1269 if (fDrawingArea == kContent_DrawingArea) { 1269 if (fDrawingArea == kContent_DrawingArea) {
1270 return fLastContentEntry; 1270 return fLastContentEntry;
1271 } else { 1271 } else {
1272 return fLastMarginContentEntry; 1272 return fLastMarginContentEntry;
1273 } 1273 }
1274 } 1274 }
1275 1275
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 SkAutoTUnref<SkPDFObject> image( 2185 SkAutoTUnref<SkPDFObject> image(
2186 SkPDFCreateImageObject(*bitmap, subset, fEncoder)); 2186 SkPDFCreateImageObject(*bitmap, subset, fEncoder));
2187 if (!image) { 2187 if (!image) {
2188 return; 2188 return;
2189 } 2189 }
2190 2190
2191 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), 2191 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()),
2192 &content.entry()->fContent); 2192 &content.entry()->fContent);
2193 } 2193 }
2194 2194
OLDNEW
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/ports/SkImageDecoder_CG.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698