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

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

Issue 357073003: correctly plumb through explicit rowbytes for allocPixels (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 | « no previous file | include/core/SkPixelRef.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 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 static SkMallocPixelRef* NewWithData(const SkImageInfo& info, 71 static SkMallocPixelRef* NewWithData(const SkImageInfo& info,
72 size_t rowBytes, 72 size_t rowBytes,
73 SkColorTable* ctable, 73 SkColorTable* ctable,
74 SkData* data); 74 SkData* data);
75 75
76 void* getAddr() const { return fStorage; } 76 void* getAddr() const { return fStorage; }
77 77
78 class PRFactory : public SkPixelRefFactory { 78 class PRFactory : public SkPixelRefFactory {
79 public: 79 public:
80 virtual SkPixelRef* create(const SkImageInfo&, 80 virtual SkPixelRef* create(const SkImageInfo&,
81 size_t rowBytes,
81 SkColorTable*) SK_OVERRIDE; 82 SkColorTable*) SK_OVERRIDE;
82 }; 83 };
83 84
84 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef) 85 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMallocPixelRef)
85 86
86 protected: 87 protected:
87 // The ownPixels version of this constructor is deprecated. 88 // The ownPixels version of this constructor is deprecated.
88 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, 89 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*,
89 bool ownPixels); 90 bool ownPixels);
90 SkMallocPixelRef(SkReadBuffer& buffer); 91 SkMallocPixelRef(SkReadBuffer& buffer);
(...skipping 12 matching lines...) Expand all
103 void* fReleaseProcContext; 104 void* fReleaseProcContext;
104 105
105 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, 106 SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*,
106 ReleaseProc proc, void* context); 107 ReleaseProc proc, void* context);
107 108
108 typedef SkPixelRef INHERITED; 109 typedef SkPixelRef INHERITED;
109 }; 110 };
110 111
111 112
112 #endif 113 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698