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

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

Issue 1155443004: change internals over to SkPixmap and stop using accessBitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 2015 Google Inc. 2 * Copyright 2015 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 SkPixmap_DEFINED 8 #ifndef SkPixmap_DEFINED
9 #define SkPixmap_DEFINED 9 #define SkPixmap_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 SkColorTable* ctable = NULL) 26 SkColorTable* ctable = NULL)
27 : fPixels(addr), fCTable(ctable), fRowBytes(rowBytes), fInfo(info) 27 : fPixels(addr), fCTable(ctable), fRowBytes(rowBytes), fInfo(info)
28 { 28 {
29 if (kIndex_8_SkColorType == info.colorType()) { 29 if (kIndex_8_SkColorType == info.colorType()) {
30 SkASSERT(ctable); 30 SkASSERT(ctable);
31 } else { 31 } else {
32 SkASSERT(NULL == ctable); 32 SkASSERT(NULL == ctable);
33 } 33 }
34 } 34 }
35 35
36 void reset();
37 void reset(const SkImageInfo& info, const void* addr, size_t rowBytes,
38 SkColorTable* ctable = NULL);
39
36 const SkImageInfo& info() const { return fInfo; } 40 const SkImageInfo& info() const { return fInfo; }
37 size_t rowBytes() const { return fRowBytes; } 41 size_t rowBytes() const { return fRowBytes; }
38 const void* addr() const { return fPixels; } 42 const void* addr() const { return fPixels; }
39 SkColorTable* ctable() const { return fCTable; } 43 SkColorTable* ctable() const { return fCTable; }
40 44
41 int width() const { return fInfo.width(); } 45 int width() const { return fInfo.width(); }
42 int height() const { return fInfo.height(); } 46 int height() const { return fInfo.height(); }
43 SkColorType colorType() const { return fInfo.colorType(); } 47 SkColorType colorType() const { return fInfo.colorType(); }
44 SkAlphaType alphaType() const { return fInfo.alphaType(); } 48 SkAlphaType alphaType() const { return fInfo.alphaType(); }
45 bool isOpaque() const { return fInfo.isOpaque(); } 49 bool isOpaque() const { return fInfo.isOpaque(); }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 private: 162 private:
159 void (*fUnlockProc)(void*); 163 void (*fUnlockProc)(void*);
160 void* fUnlockContext; 164 void* fUnlockContext;
161 SkPixmap fPixmap; 165 SkPixmap fPixmap;
162 bool fIsLocked; 166 bool fIsLocked;
163 167
164 friend class SkBitmap; 168 friend class SkBitmap;
165 }; 169 };
166 170
167 #endif 171 #endif
OLDNEW
« no previous file with comments | « include/core/SkDevice.h ('k') | src/core/SkBitmapDevice.cpp » ('j') | src/core/SkPixmap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698