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

Side by Side Diff: src/core/SkBitmap.cpp

Issue 483593002: eliminate code related to SkBitmap::Config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « include/gpu/SkGr.h ('k') | src/gpu/SkGr.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 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 SkTSwap(fFlags, other.fFlags); 84 SkTSwap(fFlags, other.fFlags);
85 85
86 SkDEBUGCODE(this->validate();) 86 SkDEBUGCODE(this->validate();)
87 } 87 }
88 88
89 void SkBitmap::reset() { 89 void SkBitmap::reset() {
90 this->freePixels(); 90 this->freePixels();
91 sk_bzero(this, sizeof(*this)); 91 sk_bzero(this, sizeof(*this));
92 } 92 }
93 93
94 #ifdef SK_SUPPORT_LEGACY_BITMAP_CONFIG
95 SkBitmap::Config SkBitmap::config() const {
96 return SkColorTypeToBitmapConfig(fInfo.colorType());
97 }
98 #endif
99
100 void SkBitmap::getBounds(SkRect* bounds) const { 94 void SkBitmap::getBounds(SkRect* bounds) const {
101 SkASSERT(bounds); 95 SkASSERT(bounds);
102 bounds->set(0, 0, 96 bounds->set(0, 0,
103 SkIntToScalar(fInfo.fWidth), SkIntToScalar(fInfo.fHeight)); 97 SkIntToScalar(fInfo.fWidth), SkIntToScalar(fInfo.fHeight));
104 } 98 }
105 99
106 void SkBitmap::getBounds(SkIRect* bounds) const { 100 void SkBitmap::getBounds(SkIRect* bounds) const {
107 SkASSERT(bounds); 101 SkASSERT(bounds);
108 bounds->set(0, 0, fInfo.fWidth, fInfo.fHeight); 102 bounds->set(0, 0, fInfo.fWidth, fInfo.fHeight);
109 } 103 }
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 /////////////////////////////////////////////////////////////////////////////// 1389 ///////////////////////////////////////////////////////////////////////////////
1396 1390
1397 #ifdef SK_DEBUG 1391 #ifdef SK_DEBUG
1398 void SkImageInfo::validate() const { 1392 void SkImageInfo::validate() const {
1399 SkASSERT(fWidth >= 0); 1393 SkASSERT(fWidth >= 0);
1400 SkASSERT(fHeight >= 0); 1394 SkASSERT(fHeight >= 0);
1401 SkASSERT(SkColorTypeIsValid(fColorType)); 1395 SkASSERT(SkColorTypeIsValid(fColorType));
1402 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); 1396 SkASSERT(SkAlphaTypeIsValid(fAlphaType));
1403 } 1397 }
1404 #endif 1398 #endif
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698