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

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

Issue 2309483002: WIP RasterCanvasLayerAllocator experiment 2
Patch Set: support initial data? Created 4 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
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 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 "Could not set layer transform."); 2261 "Could not set layer transform.");
2262 2262
2263 //Get the current visual collection and add the layer to it. 2263 //Get the current visual collection and add the layer to it.
2264 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; 2264 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals;
2265 HRVM(this->fCurrentXpsCanvas->GetVisuals(&currentVisuals), 2265 HRVM(this->fCurrentXpsCanvas->GetVisuals(&currentVisuals),
2266 "Could not get current visuals for layer."); 2266 "Could not get current visuals for layer.");
2267 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), 2267 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()),
2268 "Could not add layer to current visuals."); 2268 "Could not add layer to current visuals.");
2269 } 2269 }
2270 2270
2271 SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint* ) { 2271 SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint* ,
2272 SkRasterCanvasLayerAllocator*) {
2272 //Conditional for bug compatibility with PDF device. 2273 //Conditional for bug compatibility with PDF device.
2273 #if 0 2274 #if 0
2274 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { 2275 if (SkBaseDevice::kGeneral_Usage == info.fUsage) {
2275 return nullptr; 2276 return nullptr;
2276 //To what stream do we write? 2277 //To what stream do we write?
2277 //SkXPSDevice* dev = new SkXPSDevice(this); 2278 //SkXPSDevice* dev = new SkXPSDevice(this);
2278 //SkSize s = SkSize::Make(width, height); 2279 //SkSize s = SkSize::Make(width, height);
2279 //dev->BeginCanvas(s, s, SkMatrix::I()); 2280 //dev->BeginCanvas(s, s, SkMatrix::I());
2280 //return dev; 2281 //return dev;
2281 } 2282 }
2282 #endif 2283 #endif
2283 return new SkXPSDevice(this->fXpsFactory.get()); 2284 return new SkXPSDevice(this->fXpsFactory.get());
2284 } 2285 }
2285 2286
2286 #endif//defined(SK_BUILD_FOR_WIN32) 2287 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« src/core/SkRasterCanvasLayerAllocator.cpp ('K') | « src/xps/SkXPSDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698