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

Side by Side Diff: src/lazy/SkLazyPixelRef.h

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/SkPixelRef.cpp ('k') | src/lazy/SkLazyPixelRef.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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkLazyPixelRef_DEFINED 8 #ifndef SkLazyPixelRef_DEFINED
9 #define SkLazyPixelRef_DEFINED 9 #define SkLazyPixelRef_DEFINED
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // the encoded data and write that instead. 54 // the encoded data and write that instead.
55 // Future implementations of SkFlattenableWriteBuffer will need to special c ase for 55 // Future implementations of SkFlattenableWriteBuffer will need to special c ase for
56 // onRefEncodedData as well. 56 // onRefEncodedData as well.
57 SK_DECLARE_UNFLATTENABLE_OBJECT() 57 SK_DECLARE_UNFLATTENABLE_OBJECT()
58 58
59 protected: 59 protected:
60 virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE; 60 virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE;
61 virtual void onUnlockPixels() SK_OVERRIDE; 61 virtual void onUnlockPixels() SK_OVERRIDE;
62 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } 62 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; }
63 virtual SkData* onRefEncodedData() SK_OVERRIDE; 63 virtual SkData* onRefEncodedData() SK_OVERRIDE;
64 virtual bool onImplementsDecodeInto() SK_OVERRIDE;
65 virtual bool onDecodeInto(int pow2, SkBitmap*) SK_OVERRIDE;
64 66
65 private: 67 private:
66 bool fErrorInDecoding; 68 bool fErrorInDecoding;
67 SkData* fData; 69 SkData* fData;
68 SkBitmapFactory::DecodeProc fDecodeProc; 70 SkBitmapFactory::DecodeProc fDecodeProc;
69 SkImageCache* fImageCache; 71 SkImageCache* fImageCache;
70 intptr_t fCacheId; 72 intptr_t fCacheId;
71 size_t fRowBytes; 73 size_t fRowBytes;
72 74
73 #if LAZY_CACHE_STATS 75 #if LAZY_CACHE_STATS
74 static int32_t gCacheHits; 76 static int32_t gCacheHits;
75 static int32_t gCacheMisses; 77 static int32_t gCacheMisses;
76 #endif 78 #endif
77 79
78 typedef SkPixelRef INHERITED; 80 typedef SkPixelRef INHERITED;
79 }; 81 };
80 82
81 #endif // SkLazyPixelRef_DEFINED 83 #endif // SkLazyPixelRef_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkPixelRef.cpp ('k') | src/lazy/SkLazyPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698