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

Side by Side Diff: include/core/SkPixelRef.h

Issue 125063002: add rowBytes param to setPreLock, in prep for onNewLockPixels change (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | « no previous file | src/core/SkMallocPixelRef.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 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
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 8
9 9
10 #ifndef SkPixelRef_DEFINED 10 #ifndef SkPixelRef_DEFINED
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 */ 298 */
299 SkBaseMutex* mutex() const { return fMutex; } 299 SkBaseMutex* mutex() const { return fMutex; }
300 300
301 // serialization 301 // serialization
302 SkPixelRef(SkFlattenableReadBuffer&, SkBaseMutex*); 302 SkPixelRef(SkFlattenableReadBuffer&, SkBaseMutex*);
303 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 303 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
304 304
305 // only call from constructor. Flags this to always be locked, removing 305 // only call from constructor. Flags this to always be locked, removing
306 // the need to grab the mutex and call onLockPixels/onUnlockPixels. 306 // the need to grab the mutex and call onLockPixels/onUnlockPixels.
307 // Performance tweak to avoid those calls (esp. in multi-thread use case). 307 // Performance tweak to avoid those calls (esp. in multi-thread use case).
308 void setPreLocked(void* pixels, SkColorTable* ctable); 308 void setPreLocked(void* pixels, size_t rowBytes, SkColorTable* ctable);
309 309
310 private: 310 private:
311 SkBaseMutex* fMutex; // must remain in scope for the life of this object 311 SkBaseMutex* fMutex; // must remain in scope for the life of this object
312 312
313 const SkImageInfo fInfo; 313 const SkImageInfo fInfo;
314 314
315 void* fPixels; 315 void* fPixels;
316 SkColorTable* fColorTable; // we do not track ownership, subclass does 316 SkColorTable* fColorTable; // we do not track ownership, subclass does
317 int fLockCount; 317 int fLockCount;
318 318
(...skipping 16 matching lines...) Expand all
335 335
336 // When copying a bitmap to another with the same shape and config, we can s afely 336 // When copying a bitmap to another with the same shape and config, we can s afely
337 // clone the pixelref generation ID too, which makes them equivalent under c aching. 337 // clone the pixelref generation ID too, which makes them equivalent under c aching.
338 friend class SkBitmap; // only for cloneGenID 338 friend class SkBitmap; // only for cloneGenID
339 void cloneGenID(const SkPixelRef&); 339 void cloneGenID(const SkPixelRef&);
340 340
341 typedef SkFlattenable INHERITED; 341 typedef SkFlattenable INHERITED;
342 }; 342 };
343 343
344 #endif 344 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkMallocPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698