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

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

Issue 1158273007: switch bitmapshader internals over to pixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix neon/mips to use pixmpas Created 5 years, 6 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 | src/core/SkBitmapController.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 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 30 matching lines...) Expand all
41 size_t rowBytes() const { return fRowBytes; } 41 size_t rowBytes() const { return fRowBytes; }
42 const void* addr() const { return fPixels; } 42 const void* addr() const { return fPixels; }
43 SkColorTable* ctable() const { return fCTable; } 43 SkColorTable* ctable() const { return fCTable; }
44 44
45 int width() const { return fInfo.width(); } 45 int width() const { return fInfo.width(); }
46 int height() const { return fInfo.height(); } 46 int height() const { return fInfo.height(); }
47 SkColorType colorType() const { return fInfo.colorType(); } 47 SkColorType colorType() const { return fInfo.colorType(); }
48 SkAlphaType alphaType() const { return fInfo.alphaType(); } 48 SkAlphaType alphaType() const { return fInfo.alphaType(); }
49 bool isOpaque() const { return fInfo.isOpaque(); } 49 bool isOpaque() const { return fInfo.isOpaque(); }
50 50
51 SkIRect bounds() const { return SkIRect::MakeWH(this->width(), this->height( )); }
52
51 uint64_t getSize64() const { return sk_64_mul(fInfo.height(), fRowBytes); } 53 uint64_t getSize64() const { return sk_64_mul(fInfo.height(), fRowBytes); }
52 uint64_t getSafeSize64() const { return fInfo.getSafeSize64(fRowBytes); } 54 uint64_t getSafeSize64() const { return fInfo.getSafeSize64(fRowBytes); }
53 size_t getSafeSize() const { return fInfo.getSafeSize(fRowBytes); } 55 size_t getSafeSize() const { return fInfo.getSafeSize(fRowBytes); }
54 56
55 const uint32_t* addr32() const { 57 const uint32_t* addr32() const {
56 SkASSERT(4 == SkColorTypeBytesPerPixel(fInfo.colorType())); 58 SkASSERT(4 == SkColorTypeBytesPerPixel(fInfo.colorType()));
57 return reinterpret_cast<const uint32_t*>(fPixels); 59 return reinterpret_cast<const uint32_t*>(fPixels);
58 } 60 }
59 61
60 const uint16_t* addr16() const { 62 const uint16_t* addr16() const {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 private: 164 private:
163 void (*fUnlockProc)(void*); 165 void (*fUnlockProc)(void*);
164 void* fUnlockContext; 166 void* fUnlockContext;
165 SkPixmap fPixmap; 167 SkPixmap fPixmap;
166 bool fIsLocked; 168 bool fIsLocked;
167 169
168 friend class SkBitmap; 170 friend class SkBitmap;
169 }; 171 };
170 172
171 #endif 173 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmapController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698