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

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

Issue 387313004: remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « src/core/SkScaledImageCache.cpp ('k') | src/lazy/SkDiscardablePixelRef.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 * 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 51
52 #ifdef SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE
53 // No need to flatten this object. When flattening an SkBitmap,
54 // SkWriteBuffer will check the encoded data and write that
55 // instead.
56 // Future implementations of SkWriteBuffer will need to
57 // special case for onRefEncodedData as well.
58 SK_DECLARE_UNFLATTENABLE_OBJECT()
59 #endif
60
61 private: 52 private:
62 SkImageGenerator* const fImageGenerator; 53 SkImageGenerator* const fImageGenerator;
63 bool fErrorInDecoding; 54 bool fErrorInDecoding;
64 void* fScaledCacheId; 55 void* fScaledCacheId;
65 const size_t fRowBytes; 56 const size_t fRowBytes;
66 57
67 SkCachingPixelRef(const SkImageInfo&, SkImageGenerator*, size_t rowBytes); 58 SkCachingPixelRef(const SkImageInfo&, SkImageGenerator*, size_t rowBytes);
68 59
69 typedef SkPixelRef INHERITED; 60 typedef SkPixelRef INHERITED;
70 }; 61 };
71 62
72 #endif // SkCachingPixelRef_DEFINED 63 #endif // SkCachingPixelRef_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkScaledImageCache.cpp ('k') | src/lazy/SkDiscardablePixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698