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

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

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 | « src/core/SkDeviceImageFilterProxy.h ('k') | src/gpu/SkGpuDevice.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 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 "Could not get current visuals for layer."); 2411 "Could not get current visuals for layer.");
2412 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), 2412 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()),
2413 "Could not add layer to current visuals."); 2413 "Could not add layer to current visuals.");
2414 } 2414 }
2415 2415
2416 bool SkXPSDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, 2416 bool SkXPSDevice::onReadPixels(const SkBitmap& bitmap, int x, int y,
2417 SkCanvas::Config8888) { 2417 SkCanvas::Config8888) {
2418 return false; 2418 return false;
2419 } 2419 }
2420 2420
2421 SkBaseDevice* SkXPSDevice::onCreateCompatibleDevice(SkBitmap::Config config, 2421 SkBaseDevice* SkXPSDevice::onCreateDevice(const SkImageInfo&, Usage) {
2422 int width, int height,
2423 bool isOpaque,
2424 Usage usage) {
2425
2426 //Conditional for bug compatibility with PDF device. 2422 //Conditional for bug compatibility with PDF device.
2427 #if 0 2423 #if 0
2428 if (SkBaseDevice::kGeneral_Usage == usage) { 2424 if (SkBaseDevice::kGeneral_Usage == usage) {
2429 return NULL; 2425 return NULL;
2430 SK_CRASH(); 2426 SK_CRASH();
2431 //To what stream do we write? 2427 //To what stream do we write?
2432 //SkXPSDevice* dev = new SkXPSDevice(this); 2428 //SkXPSDevice* dev = new SkXPSDevice(this);
2433 //SkSize s = SkSize::Make(width, height); 2429 //SkSize s = SkSize::Make(width, height);
2434 //dev->BeginCanvas(s, s, SkMatrix::I()); 2430 //dev->BeginCanvas(s, s, SkMatrix::I());
2435 //return dev; 2431 //return dev;
(...skipping 13 matching lines...) Expand all
2449 IID_PPV_ARGS(&this->fXpsFactory)), 2445 IID_PPV_ARGS(&this->fXpsFactory)),
2450 "Could not create factory for layer."); 2446 "Could not create factory for layer.");
2451 2447
2452 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), 2448 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas),
2453 "Could not create canvas for layer."); 2449 "Could not create canvas for layer.");
2454 } 2450 }
2455 2451
2456 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { 2452 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) {
2457 return false; 2453 return false;
2458 } 2454 }
OLDNEW
« no previous file with comments | « src/core/SkDeviceImageFilterProxy.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698