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

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

Issue 1008863002: Revert of Change device creation to see the (optional) layer-paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/core/SkDeviceImageFilterProxy.h ('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 #include "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 #ifndef UNICODE 10 #ifndef UNICODE
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 "Could not set layer transform."); 2244 "Could not set layer transform.");
2245 2245
2246 //Get the current visual collection and add the layer to it. 2246 //Get the current visual collection and add the layer to it.
2247 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; 2247 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals;
2248 HRVM(this->fCurrentXpsCanvas->GetVisuals(&currentVisuals), 2248 HRVM(this->fCurrentXpsCanvas->GetVisuals(&currentVisuals),
2249 "Could not get current visuals for layer."); 2249 "Could not get current visuals for layer.");
2250 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), 2250 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()),
2251 "Could not add layer to current visuals."); 2251 "Could not add layer to current visuals.");
2252 } 2252 }
2253 2253
2254 SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint* ) { 2254 SkBaseDevice* SkXPSDevice::onCreateCompatibleDevice(const CreateInfo& info) {
2255 //Conditional for bug compatibility with PDF device. 2255 //Conditional for bug compatibility with PDF device.
2256 #if 0 2256 #if 0
2257 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { 2257 if (SkBaseDevice::kGeneral_Usage == info.fUsage) {
2258 return NULL; 2258 return NULL;
2259 SK_CRASH(); 2259 SK_CRASH();
2260 //To what stream do we write? 2260 //To what stream do we write?
2261 //SkXPSDevice* dev = new SkXPSDevice(this); 2261 //SkXPSDevice* dev = new SkXPSDevice(this);
2262 //SkSize s = SkSize::Make(width, height); 2262 //SkSize s = SkSize::Make(width, height);
2263 //dev->BeginCanvas(s, s, SkMatrix::I()); 2263 //dev->BeginCanvas(s, s, SkMatrix::I());
2264 //return dev; 2264 //return dev;
(...skipping 10 matching lines...) Expand all
2275 CLSID_XpsOMObjectFactory, 2275 CLSID_XpsOMObjectFactory,
2276 NULL, 2276 NULL,
2277 CLSCTX_INPROC_SERVER, 2277 CLSCTX_INPROC_SERVER,
2278 IID_PPV_ARGS(&this->fXpsFactory)), 2278 IID_PPV_ARGS(&this->fXpsFactory)),
2279 "Could not create factory for layer."); 2279 "Could not create factory for layer.");
2280 2280
2281 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2281 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2282 "Could not create canvas for layer."); 2282 "Could not create canvas for layer.");
2283 } 2283 }
2284 2284
2285 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) {
2286 return false;
2287 }
OLDNEW
« no previous file with comments | « src/core/SkDeviceImageFilterProxy.h ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698