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

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

Issue 334993002: hide virtuals on device for width/height/isopaque (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « include/gpu/SkGpuDevice.h ('k') | src/gpu/GrPictureUtils.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 #include "SkDevice.h" 8 #include "SkDevice.h"
9 #include "SkMetaData.h" 9 #include "SkMetaData.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
51 51
52 // TODO: should make this guy pure-virtual.
53 SkImageInfo SkBaseDevice::imageInfo() const { 52 SkImageInfo SkBaseDevice::imageInfo() const {
54 return SkImageInfo::MakeUnknown(this->width(), this->height()); 53 return SkImageInfo::MakeUnknown();
55 } 54 }
56 55
57 const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) { 56 const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) {
58 const SkBitmap& bitmap = this->onAccessBitmap(); 57 const SkBitmap& bitmap = this->onAccessBitmap();
59 if (changePixels) { 58 if (changePixels) {
60 bitmap.notifyPixelsChanged(); 59 bitmap.notifyPixelsChanged();
61 } 60 }
62 return bitmap; 61 return bitmap;
63 } 62 }
64 63
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 135 }
137 136
138 void SkBaseDevice::EXPERIMENTAL_purge(const SkPicture* picture) { 137 void SkBaseDevice::EXPERIMENTAL_purge(const SkPicture* picture) {
139 // Derived-classes may have data to purge but not the base class 138 // Derived-classes may have data to purge but not the base class
140 } 139 }
141 140
142 bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* p icture) { 141 bool SkBaseDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* p icture) {
143 // The base class doesn't perform any accelerated picture rendering 142 // The base class doesn't perform any accelerated picture rendering
144 return false; 143 return false;
145 } 144 }
OLDNEW
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698