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

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

Issue 720213002: Rename onCreateDevice -> onCreateCompatibleDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/core/SkDevice.cpp ('k') | src/gpu/SkGpuDevice.h » ('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 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 "Could not set layer transform."); 2240 "Could not set layer transform.");
2241 2241
2242 //Get the current visual collection and add the layer to it. 2242 //Get the current visual collection and add the layer to it.
2243 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; 2243 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals;
2244 HRVM(this->fCurrentXpsCanvas->GetVisuals(&currentVisuals), 2244 HRVM(this->fCurrentXpsCanvas->GetVisuals(&currentVisuals),
2245 "Could not get current visuals for layer."); 2245 "Could not get current visuals for layer.");
2246 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), 2246 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()),
2247 "Could not add layer to current visuals."); 2247 "Could not add layer to current visuals.");
2248 } 2248 }
2249 2249
2250 SkBaseDevice* SkXPSDevice::onCreateDevice(const SkImageInfo&, Usage) { 2250 SkBaseDevice* SkXPSDevice::onCreateCompatibleDevice(const CreateInfo& info) {
2251 //Conditional for bug compatibility with PDF device. 2251 //Conditional for bug compatibility with PDF device.
2252 #if 0 2252 #if 0
2253 if (SkBaseDevice::kGeneral_Usage == usage) { 2253 if (SkBaseDevice::kGeneral_Usage == info.fUsage) {
2254 return NULL; 2254 return NULL;
2255 SK_CRASH(); 2255 SK_CRASH();
2256 //To what stream do we write? 2256 //To what stream do we write?
2257 //SkXPSDevice* dev = new SkXPSDevice(this); 2257 //SkXPSDevice* dev = new SkXPSDevice(this);
2258 //SkSize s = SkSize::Make(width, height); 2258 //SkSize s = SkSize::Make(width, height);
2259 //dev->BeginCanvas(s, s, SkMatrix::I()); 2259 //dev->BeginCanvas(s, s, SkMatrix::I());
2260 //return dev; 2260 //return dev;
2261 } 2261 }
2262 #endif 2262 #endif
2263 return new SkXPSDevice(this->fXpsFactory.get()); 2263 return new SkXPSDevice(this->fXpsFactory.get());
(...skipping 10 matching lines...) Expand all
2274 IID_PPV_ARGS(&this->fXpsFactory)), 2274 IID_PPV_ARGS(&this->fXpsFactory)),
2275 "Could not create factory for layer."); 2275 "Could not create factory for layer.");
2276 2276
2277 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2277 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2278 "Could not create canvas for layer."); 2278 "Could not create canvas for layer.");
2279 } 2279 }
2280 2280
2281 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { 2281 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) {
2282 return false; 2282 return false;
2283 } 2283 }
OLDNEW
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698