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

Side by Side Diff: include/pdf/SkPDFDevice.h

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkBitmapDevice.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPDFDevice_DEFINED 10 #ifndef SkPDFDevice_DEFINED
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Glyph ids used for each font on this device. 250 // Glyph ids used for each font on this device.
251 SkAutoTDelete<SkPDFGlyphSetMap> fFontGlyphUsage; 251 SkAutoTDelete<SkPDFGlyphSetMap> fFontGlyphUsage;
252 252
253 SkPicture::EncodeBitmap fEncoder; 253 SkPicture::EncodeBitmap fEncoder;
254 SkScalar fRasterDpi; 254 SkScalar fRasterDpi;
255 255
256 SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack, 256 SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack,
257 const SkRegion& existingClipRegion); 257 const SkRegion& existingClipRegion);
258 258
259 // override from SkBaseDevice 259 // override from SkBaseDevice
260 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, 260 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE;
261 int width, int height,
262 bool isOpaque,
263 Usage usage) SK_OVERRIDE;
264 261
265 void init(); 262 void init();
266 void cleanUp(bool clearFontUsage); 263 void cleanUp(bool clearFontUsage);
267 SkPDFFormXObject* createFormXObjectFromDevice(); 264 SkPDFFormXObject* createFormXObjectFromDevice();
268 265
269 void drawFormXObjectWithMask(int xObjectIndex, 266 void drawFormXObjectWithMask(int xObjectIndex,
270 SkPDFFormXObject* mask, 267 SkPDFFormXObject* mask,
271 const SkClipStack* clipStack, 268 const SkClipStack* clipStack,
272 const SkRegion& clipRegion, 269 const SkRegion& clipRegion,
273 SkXfermode::Mode mode, 270 SkXfermode::Mode mode,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 330
334 typedef SkBitmapDevice INHERITED; 331 typedef SkBitmapDevice INHERITED;
335 332
336 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 333 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
337 // an SkPDFDevice 334 // an SkPDFDevice
338 //friend class SkDocument_PDF; 335 //friend class SkDocument_PDF;
339 //friend class SkPDFImageShader; 336 //friend class SkPDFImageShader;
340 }; 337 };
341 338
342 #endif 339 #endif
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698