Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"
This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497.
git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index bff0880..2f1c9a4 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -502,11 +502,11 @@
// This is intended to be a size_t version of ComputeSafeSize64(), just
// faster. The computation is meant to be identical.
return (fHeight ? ((fHeight - 1) * fRowBytes) +
- ComputeRowBytes(this->config(), fWidth): 0);
+ ComputeRowBytes(getConfig(), fWidth): 0);
}
Sk64 SkBitmap::getSafeSize64() const {
- return ComputeSafeSize64(this->config(), fWidth, fHeight, fRowBytes);
+ return ComputeSafeSize64(getConfig(), fWidth, fHeight, fRowBytes);
}
bool SkBitmap::copyPixelsTo(void* const dst, size_t dstSize,
@@ -516,12 +516,12 @@
dstRowBytes = fRowBytes;
}
- if (dstRowBytes < ComputeRowBytes(this->config(), fWidth) ||
+ if (dstRowBytes < ComputeRowBytes(getConfig(), fWidth) ||
dst == NULL || (getPixels() == NULL && pixelRef() == NULL))
return false;
if (!preserveDstPad && static_cast<uint32_t>(dstRowBytes) == fRowBytes) {
- size_t safeSize = this->getSafeSize();
+ size_t safeSize = getSafeSize();
if (safeSize > dstSize || safeSize == 0)
return false;
else {
@@ -535,12 +535,12 @@
}
} else {
// If destination has different stride than us, then copy line by line.
- if (ComputeSafeSize(this->config(), fWidth, fHeight, dstRowBytes) >
+ if (ComputeSafeSize(getConfig(), fWidth, fHeight, dstRowBytes) >
dstSize)
return false;
else {
// Just copy what we need on each line.
- size_t rowBytes = ComputeRowBytes(this->config(), fWidth);
+ size_t rowBytes = ComputeRowBytes(getConfig(), fWidth);
SkAutoLockPixels lock(*this);
const uint8_t* srcP = reinterpret_cast<const uint8_t*>(getPixels());
uint8_t* dstP = reinterpret_cast<uint8_t*>(dst);
@@ -874,7 +874,7 @@
* within the bounds of the SkPixelRef being used.
*/
static size_t get_sub_offset(const SkBitmap& bm, int x, int y) {
- switch (bm.config()) {
+ switch (bm.getConfig()) {
case SkBitmap::kA8_Config:
case SkBitmap:: kIndex8_Config:
// x is fine as is for the calculation
@@ -1005,7 +1005,7 @@
#include "SkPaint.h"
bool SkBitmap::canCopyTo(Config dstConfig) const {
- if (this->config() == kNo_Config) {
+ if (this->getConfig() == kNo_Config) {
return false;
}
@@ -1028,7 +1028,7 @@
}
// do not copy src if srcConfig == kA1_Config while dstConfig != kA1_Config
- if (this->config() == kA1_Config && !sameConfigs) {
+ if (this->getConfig() == kA1_Config && !sameConfigs) {
return false;
}
@@ -1305,7 +1305,7 @@
void (*proc)(SkBitmap* dst, int x, int y, const SkBitmap& src);
- const SkBitmap::Config config = this->config();
+ const SkBitmap::Config config = this->getConfig();
switch (config) {
case kARGB_8888_Config:
@@ -1444,7 +1444,7 @@
SkASSERT(alpha != NULL);
SkASSERT(alphaRowBytes >= src.width());
- SkBitmap::Config config = src.config();
+ SkBitmap::Config config = src.getConfig();
int w = src.width();
int h = src.height();
size_t rb = src.rowBytes();