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

Side by Side Diff: src/device/xps/SkXPSDevice.cpp

Issue 173893002: use colortype instead of config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | « src/core/SkSpriteBlitter_RGB16.cpp ('k') | src/lazy/SkDiscardablePixelRef.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 #ifndef UNICODE 8 #ifndef UNICODE
9 #define UNICODE 9 #define UNICODE
10 #endif 10 #endif
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 if (format_guid(guid, buffer, bufferSize, sep) == -1) { 100 if (format_guid(guid, buffer, bufferSize, sep) == -1) {
101 HRM(E_UNEXPECTED, "Could not format GUID into id."); 101 HRM(E_UNEXPECTED, "Could not format GUID into id.");
102 } 102 }
103 103
104 return S_OK; 104 return S_OK;
105 } 105 }
106 106
107 static SkBitmap make_fake_bitmap(int width, int height) { 107 static SkBitmap make_fake_bitmap(int width, int height) {
108 SkBitmap bitmap; 108 SkBitmap bitmap;
109 bitmap.setConfig(SkBitmap::kNo_Config, width, height); 109 bitmap.setConfig(SkImageInfo::MakeUnknown(width, height));
110 return bitmap; 110 return bitmap;
111 } 111 }
112 112
113 // TODO: should inherit from SkBaseDevice instead of SkBitmapDevice...
113 SkXPSDevice::SkXPSDevice() 114 SkXPSDevice::SkXPSDevice()
114 : SkBitmapDevice(make_fake_bitmap(10000, 10000)) 115 : SkBitmapDevice(make_fake_bitmap(10000, 10000))
115 , fCurrentPage(0) { 116 , fCurrentPage(0) {
116 } 117 }
117 118
118 SkXPSDevice::~SkXPSDevice() { 119 SkXPSDevice::~SkXPSDevice() {
119 } 120 }
120 121
121 SkXPSDevice::TypefaceUse::TypefaceUse() 122 SkXPSDevice::TypefaceUse::TypefaceUse()
122 : typefaceId(0xffffffff) 123 : typefaceId(0xffffffff)
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 IID_PPV_ARGS(&this->fXpsFactory)), 2446 IID_PPV_ARGS(&this->fXpsFactory)),
2446 "Could not create factory for layer."); 2447 "Could not create factory for layer.");
2447 2448
2448 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2449 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2449 "Could not create canvas for layer."); 2450 "Could not create canvas for layer.");
2450 } 2451 }
2451 2452
2452 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { 2453 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) {
2453 return false; 2454 return false;
2454 } 2455 }
OLDNEW
« no previous file with comments | « src/core/SkSpriteBlitter_RGB16.cpp ('k') | src/lazy/SkDiscardablePixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698