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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 SkCachingPixelRef_DEFINED 8 #ifndef SkCachingPixelRef_DEFINED
9 #define SkCachingPixelRef_DEFINED 9 #define SkCachingPixelRef_DEFINED
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 protected: 42 protected:
43 virtual ~SkCachingPixelRef(); 43 virtual ~SkCachingPixelRef();
44 virtual bool onNewLockPixels(LockRec*) SK_OVERRIDE; 44 virtual bool onNewLockPixels(LockRec*) SK_OVERRIDE;
45 virtual void onUnlockPixels() SK_OVERRIDE; 45 virtual void onUnlockPixels() SK_OVERRIDE;
46 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } 46 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; }
47 47
48 virtual SkData* onRefEncodedData() SK_OVERRIDE { 48 virtual SkData* onRefEncodedData() SK_OVERRIDE {
49 return fImageGenerator->refEncodedData(); 49 return fImageGenerator->refEncodedData();
50 } 50 }
51 // No need to flatten this object. When flattening an SkBitmap, 51 // No need to flatten this object. When flattening an SkBitmap,
52 // SkOrderedWriteBuffer will check the encoded data and write that 52 // SkWriteBuffer will check the encoded data and write that
53 // instead. 53 // instead.
54 // Future implementations of SkFlattenableWriteBuffer will need to 54 // Future implementations of SkWriteBuffer will need to
55 // special case for onRefEncodedData as well. 55 // special case for onRefEncodedData as well.
56 SK_DECLARE_UNFLATTENABLE_OBJECT() 56 SK_DECLARE_UNFLATTENABLE_OBJECT()
57 57
58 private: 58 private:
59 SkImageGenerator* const fImageGenerator; 59 SkImageGenerator* const fImageGenerator;
60 bool fErrorInDecoding; 60 bool fErrorInDecoding;
61 void* fScaledCacheId; 61 void* fScaledCacheId;
62 const size_t fRowBytes; 62 const size_t fRowBytes;
63 63
64 SkCachingPixelRef(const SkImageInfo&, SkImageGenerator*, size_t rowBytes); 64 SkCachingPixelRef(const SkImageInfo&, SkImageGenerator*, size_t rowBytes);
65 65
66 typedef SkPixelRef INHERITED; 66 typedef SkPixelRef INHERITED;
67 }; 67 };
68 68
69 #endif // SkCachingPixelRef_DEFINED 69 #endif // SkCachingPixelRef_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698