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

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

Issue 23591030: start to remove lockPixels from bitmapshader (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/lazy/SkLazyPixelRef.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkPixelRef.h" 8 #include "SkPixelRef.h"
9 #include "SkFlattenableBuffers.h" 9 #include "SkFlattenableBuffers.h"
10 #include "SkThread.h" 10 #include "SkThread.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 bool SkPixelRef::lockPixelsAreWritable() const { 162 bool SkPixelRef::lockPixelsAreWritable() const {
163 return this->onLockPixelsAreWritable(); 163 return this->onLockPixelsAreWritable();
164 } 164 }
165 165
166 bool SkPixelRef::onLockPixelsAreWritable() const { 166 bool SkPixelRef::onLockPixelsAreWritable() const {
167 return true; 167 return true;
168 } 168 }
169 169
170 bool SkPixelRef::onImplementsDecodeInto() {
171 return false;
172 }
173
174 bool SkPixelRef::onDecodeInto(int pow2, SkBitmap* bitmap) {
175 return false;
176 }
177
170 uint32_t SkPixelRef::getGenerationID() const { 178 uint32_t SkPixelRef::getGenerationID() const {
171 if (0 == fGenerationID) { 179 if (0 == fGenerationID) {
172 fGenerationID = SkNextPixelRefGenerationID(); 180 fGenerationID = SkNextPixelRefGenerationID();
173 } 181 }
174 return fGenerationID; 182 return fGenerationID;
175 } 183 }
176 184
177 void SkPixelRef::notifyPixelsChanged() { 185 void SkPixelRef::notifyPixelsChanged() {
178 #ifdef SK_DEBUG 186 #ifdef SK_DEBUG
179 if (fIsImmutable) { 187 if (fIsImmutable) {
(...skipping 24 matching lines...) Expand all
204 212
205 #ifdef SK_BUILD_FOR_ANDROID 213 #ifdef SK_BUILD_FOR_ANDROID
206 void SkPixelRef::globalRef(void* data) { 214 void SkPixelRef::globalRef(void* data) {
207 this->ref(); 215 this->ref();
208 } 216 }
209 217
210 void SkPixelRef::globalUnref() { 218 void SkPixelRef::globalUnref() {
211 this->unref(); 219 this->unref();
212 } 220 }
213 #endif 221 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/lazy/SkLazyPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698