aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-07-07 14:45:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-07 14:45:11 -0700
commit060c41a499b1e8c2b34661b5eb988630e25c6421 (patch)
treebc927531d212b539803ccc79fe2ec8b7b2bf63a8 /src/core
parent9a9eae21ed5235869702a66d6decddd6643792c3 (diff)
remove unneeded flags (have been purged from chrome and android)
TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/372793003
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkBitmap.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index e525ea2f1d..a40f61af35 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -97,48 +97,6 @@ SkBitmap::Config SkBitmap::config() const {
}
#endif
-#ifdef SK_SUPPORT_LEGACY_COMPUTE_CONFIG_SIZE
-int SkBitmap::ComputeBytesPerPixel(SkBitmap::Config config) {
- int bpp;
- switch (config) {
- case kNo_Config:
- bpp = 0; // not applicable
- break;
- case kA8_Config:
- case kIndex8_Config:
- bpp = 1;
- break;
- case kRGB_565_Config:
- case kARGB_4444_Config:
- bpp = 2;
- break;
- case kARGB_8888_Config:
- bpp = 4;
- break;
- default:
- SkDEBUGFAIL("unknown config");
- bpp = 0; // error
- break;
- }
- return bpp;
-}
-
-size_t SkBitmap::ComputeRowBytes(Config c, int width) {
- return SkColorTypeMinRowBytes(SkBitmapConfigToColorType(c), width);
-}
-
-int64_t SkBitmap::ComputeSize64(Config config, int width, int height) {
- SkColorType ct = SkBitmapConfigToColorType(config);
- int64_t rowBytes = sk_64_mul(SkColorTypeBytesPerPixel(ct), width);
- return rowBytes * height;
-}
-
-size_t SkBitmap::ComputeSize(Config c, int width, int height) {
- int64_t size = SkBitmap::ComputeSize64(c, width, height);
- return sk_64_isS32(size) ? sk_64_asS32(size) : 0;
-}
-#endif
-
void SkBitmap::getBounds(SkRect* bounds) const {
SkASSERT(bounds);
bounds->set(0, 0,
@@ -188,14 +146,6 @@ bool SkBitmap::setInfo(const SkImageInfo& origInfo, size_t rowBytes) {
return true;
}
-#ifdef SK_SUPPORT_LEGACY_SETCONFIG
-bool SkBitmap::setConfig(Config config, int width, int height, size_t rowBytes,
- SkAlphaType alphaType) {
- SkColorType ct = SkBitmapConfigToColorType(config);
- return this->setInfo(SkImageInfo::Make(width, height, ct, alphaType), rowBytes);
-}
-#endif
-
bool SkBitmap::setAlphaType(SkAlphaType alphaType) {
if (!SkColorTypeValidateAlphaType(fInfo.fColorType, alphaType, &alphaType)) {
return false;