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

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

Issue 1514503004: SkBitmap move (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-10 (Thursday) 17:55:13 EST Created 5 years 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (format_guid(guid, buffer, bufferSize, sep) == -1) { 101 if (format_guid(guid, buffer, bufferSize, sep) == -1) {
102 HRM(E_UNEXPECTED, "Could not format GUID into id."); 102 HRM(E_UNEXPECTED, "Could not format GUID into id.");
103 } 103 }
104 104
105 return S_OK; 105 return S_OK;
106 } 106 }
107 107
108 static SkBitmap make_fake_bitmap(int width, int height) { 108 static SkBitmap make_fake_bitmap(int width, int height) {
109 SkBitmap bitmap; 109 SkBitmap bitmap;
110 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); 110 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height));
111 return bitmap; 111 return skstd::move(bitmap);
112 } 112 }
113 113
114 // TODO: should inherit from SkBaseDevice instead of SkBitmapDevice... 114 // TODO: should inherit from SkBaseDevice instead of SkBitmapDevice...
115 SkXPSDevice::SkXPSDevice() 115 SkXPSDevice::SkXPSDevice()
116 : INHERITED(make_fake_bitmap(10000, 10000), SkSurfaceProps(0, kUnknown_SkPix elGeometry)) 116 : INHERITED(make_fake_bitmap(10000, 10000), SkSurfaceProps(0, kUnknown_SkPix elGeometry))
117 , fCurrentPage(0) { 117 , fCurrentPage(0) {
118 } 118 }
119 119
120 SkXPSDevice::SkXPSDevice(IXpsOMObjectFactory* xpsFactory) 120 SkXPSDevice::SkXPSDevice(IXpsOMObjectFactory* xpsFactory)
121 : INHERITED(make_fake_bitmap(10000, 10000), SkSurfaceProps(0, kUnknown_SkPix elGeometry)) 121 : INHERITED(make_fake_bitmap(10000, 10000), SkSurfaceProps(0, kUnknown_SkPix elGeometry))
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 //SkXPSDevice* dev = new SkXPSDevice(this); 2268 //SkXPSDevice* dev = new SkXPSDevice(this);
2269 //SkSize s = SkSize::Make(width, height); 2269 //SkSize s = SkSize::Make(width, height);
2270 //dev->BeginCanvas(s, s, SkMatrix::I()); 2270 //dev->BeginCanvas(s, s, SkMatrix::I());
2271 //return dev; 2271 //return dev;
2272 } 2272 }
2273 #endif 2273 #endif
2274 return new SkXPSDevice(this->fXpsFactory.get()); 2274 return new SkXPSDevice(this->fXpsFactory.get());
2275 } 2275 }
2276 2276
2277 #endif//defined(SK_BUILD_FOR_WIN32) 2277 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698