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

Side by Side Diff: src/core/SkDevice.cpp

Issue 723743002: move to modify onCreateDevice virtual (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/SkBitmapDevice.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 #include "SkDevice.h" 8 #include "SkDevice.h"
9 #include "SkDeviceProperties.h" 9 #include "SkDeviceProperties.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 11 matching lines...) Expand all
22 fOrigin.setZero(); 22 fOrigin.setZero();
23 fMetaData = NULL; 23 fMetaData = NULL;
24 } 24 }
25 25
26 SkBaseDevice::~SkBaseDevice() { 26 SkBaseDevice::~SkBaseDevice() {
27 SkDELETE(fLeakyProperties); 27 SkDELETE(fLeakyProperties);
28 SkDELETE(fMetaData); 28 SkDELETE(fMetaData);
29 } 29 }
30 30
31 SkBaseDevice* SkBaseDevice::createCompatibleDevice(const SkImageInfo& info) { 31 SkBaseDevice* SkBaseDevice::createCompatibleDevice(const SkImageInfo& info) {
32 return this->onCreateDevice(info, kGeneral_Usage); 32 return this->onCreateCompatibleDevice(CreateInfo(info, kGeneral_Usage));
33 } 33 }
34 34
35 SkBaseDevice* SkBaseDevice::createCompatibleDeviceForSaveLayer(const SkImageInfo & info) { 35 SkBaseDevice* SkBaseDevice::createCompatibleDeviceForSaveLayer(const SkImageInfo & info) {
36 return this->onCreateDevice(info, kSaveLayer_Usage); 36 return this->onCreateCompatibleDevice(CreateInfo(info, kSaveLayer_Usage));
37 } 37 }
38 38
39 SkBaseDevice* SkBaseDevice::createCompatibleDeviceForImageFilter(const SkImageIn fo& info) { 39 SkBaseDevice* SkBaseDevice::createCompatibleDeviceForImageFilter(const SkImageIn fo& info) {
40 return this->onCreateDevice(info, kImageFilter_Usage); 40 return this->onCreateCompatibleDevice(CreateInfo(info, kImageFilter_Usage));
41 } 41 }
42 42
43 SkMetaData& SkBaseDevice::getMetaData() { 43 SkMetaData& SkBaseDevice::getMetaData() {
44 // metadata users are rare, so we lazily allocate it. If that changes we 44 // metadata users are rare, so we lazily allocate it. If that changes we
45 // can decide to just make it a field in the device (rather than a ptr) 45 // can decide to just make it a field in the device (rather than a ptr)
46 if (NULL == fMetaData) { 46 if (NULL == fMetaData) {
47 fMetaData = new SkMetaData; 47 fMetaData = new SkMetaData;
48 } 48 }
49 return *fMetaData; 49 return *fMetaData;
50 } 50 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 void* SkBaseDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) { 181 void* SkBaseDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) {
182 return NULL; 182 return NULL;
183 } 183 }
184 184
185 bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const S kMatrix*, 185 bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const S kMatrix*,
186 const SkPaint*) { 186 const SkPaint*) {
187 // The base class doesn't perform any accelerated picture rendering 187 // The base class doesn't perform any accelerated picture rendering
188 return false; 188 return false;
189 } 189 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698