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

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

Issue 1514503004: SkBitmap move (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-14 (Monday) 12:27:36 EST Created 5 years 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/SkBitmap.cpp » ('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 2006 The Android Open Source Project 2 * Copyright 2006 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 #ifndef SkBitmap_DEFINED 8 #ifndef SkBitmap_DEFINED
9 #define SkBitmap_DEFINED 9 #define SkBitmap_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 /** Copies the src bitmap into this bitmap. Ownership of the src bitmap's pi xels remains 59 /** Copies the src bitmap into this bitmap. Ownership of the src bitmap's pi xels remains
60 with the src bitmap. 60 with the src bitmap.
61 */ 61 */
62 SkBitmap& operator=(const SkBitmap& src); 62 SkBitmap& operator=(const SkBitmap& src);
63 /** Swap the fields of the two bitmaps. This routine is guaranteed to never fail or throw. 63 /** Swap the fields of the two bitmaps. This routine is guaranteed to never fail or throw.
64 */ 64 */
65 // This method is not exported to java. 65 // This method is not exported to java.
66 void swap(SkBitmap& other); 66 void swap(SkBitmap& other);
67 67
68 SkBitmap& operator=(SkBitmap&&);
69 SkBitmap(SkBitmap&&);
reed1 2015/12/14 17:42:42 style nit: move these closer to their counterparts
hal.canary 2015/12/14 17:55:25 done
70
68 /////////////////////////////////////////////////////////////////////////// 71 ///////////////////////////////////////////////////////////////////////////
69 72
70 const SkImageInfo& info() const { return fInfo; } 73 const SkImageInfo& info() const { return fInfo; }
71 74
72 int width() const { return fInfo.width(); } 75 int width() const { return fInfo.width(); }
73 int height() const { return fInfo.height(); } 76 int height() const { return fInfo.height(); }
74 SkColorType colorType() const { return fInfo.colorType(); } 77 SkColorType colorType() const { return fInfo.colorType(); }
75 SkAlphaType alphaType() const { return fInfo.alphaType(); } 78 SkAlphaType alphaType() const { return fInfo.alphaType(); }
76 SkColorProfileType profileType() const { return fInfo.profileType(); } 79 SkColorProfileType profileType() const { return fInfo.profileType(); }
77 80
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 816
814 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { 817 inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const {
815 SkASSERT(fPixels); 818 SkASSERT(fPixels);
816 SkASSERT(kIndex_8_SkColorType == this->colorType()); 819 SkASSERT(kIndex_8_SkColorType == this->colorType());
817 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th is->height()); 820 SkASSERT((unsigned)x < (unsigned)this->width() && (unsigned)y < (unsigned)th is->height());
818 SkASSERT(fColorTable); 821 SkASSERT(fColorTable);
819 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; 822 return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)];
820 } 823 }
821 824
822 #endif 825 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698