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

Side by Side Diff: include/core/SkMallocPixelRef.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 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
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 8
9 #ifndef SkMallocPixelRef_DEFINED 9 #ifndef SkMallocPixelRef_DEFINED
10 #define SkMallocPixelRef_DEFINED 10 #define SkMallocPixelRef_DEFINED
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual SkPixelRef* create(const SkImageInfo&, 84 virtual SkPixelRef* create(const SkImageInfo&,
85 SkColorTable*) SK_OVERRIDE; 85 SkColorTable*) SK_OVERRIDE;
86 }; 86 };
87 87
88 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef) 88 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef)
89 89
90 protected: 90 protected:
91 // The ownPixels version of this constructor is deprecated. 91 // The ownPixels version of this constructor is deprecated.
92 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, 92 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*,
93 bool ownPixels); 93 bool ownPixels);
94 SkMallocPixelRef(SkFlattenableReadBuffer& buffer); 94 SkMallocPixelRef(SkReadBuffer& buffer);
95 virtual ~SkMallocPixelRef(); 95 virtual ~SkMallocPixelRef();
96 96
97 virtual bool onNewLockPixels(LockRec*) SK_OVERRIDE; 97 virtual bool onNewLockPixels(LockRec*) SK_OVERRIDE;
98 virtual void onUnlockPixels() SK_OVERRIDE; 98 virtual void onUnlockPixels() SK_OVERRIDE;
99 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 99 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
100 virtual size_t getAllocatedSizeInBytes() const SK_OVERRIDE; 100 virtual size_t getAllocatedSizeInBytes() const SK_OVERRIDE;
101 101
102 private: 102 private:
103 void* fStorage; 103 void* fStorage;
104 SkColorTable* fCTable; 104 SkColorTable* fCTable;
105 size_t fRB; 105 size_t fRB;
106 ReleaseProc fReleaseProc; 106 ReleaseProc fReleaseProc;
107 void* fReleaseProcContext; 107 void* fReleaseProcContext;
108 108
109 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, 109 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*,
110 ReleaseProc proc, void* context); 110 ReleaseProc proc, void* context);
111 111
112 typedef SkPixelRef INHERITED; 112 typedef SkPixelRef INHERITED;
113 }; 113 };
114 114
115 115
116 #endif 116 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698