diff options
author | 2012-08-23 18:09:54 +0000 | |
---|---|---|
committer | 2012-08-23 18:09:54 +0000 | |
commit | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (patch) | |
tree | d8b4815d15946c32ee9d254e932411e93be942bb /src/core/SkBitmap.cpp | |
parent | 2abed834789bb64c7da740df4c47efc142b7311a (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r-- | src/core/SkBitmap.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 382d6a1dce..9dbf322b8e 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -464,7 +464,7 @@ Sk64 SkBitmap::getSafeSize64() const { return ComputeSafeSize64(getConfig(), fWidth, fHeight, fRowBytes); } -bool SkBitmap::copyPixelsTo(void* const dst, size_t dstSize, +bool SkBitmap::copyPixelsTo(void* const dst, size_t dstSize, int dstRowBytes, bool preserveDstPad) const { if (dstRowBytes == -1) @@ -512,9 +512,9 @@ bool SkBitmap::copyPixelsTo(void* const dst, size_t dstSize, /////////////////////////////////////////////////////////////////////////////// -bool SkBitmap::isImmutable() const { +bool SkBitmap::isImmutable() const { return fPixelRef ? fPixelRef->isImmutable() : - fFlags & kImageIsImmutable_Flag; + fFlags & kImageIsImmutable_Flag; } void SkBitmap::setImmutable() { @@ -907,10 +907,10 @@ bool SkBitmap::copyTo(SkBitmap* dst, Config dstConfig, Allocator* alloc) const { if (!src->readyToDraw()) { return false; } - + SkBitmap tmpDst; tmpDst.setConfig(dstConfig, src->width(), src->height()); - + // allocate colortable if srcConfig == kIndex8_Config SkColorTable* ctable = (dstConfig == kIndex8_Config) ? new SkColorTable(*src->getColorTable()) : NULL; @@ -918,12 +918,12 @@ bool SkBitmap::copyTo(SkBitmap* dst, Config dstConfig, Allocator* alloc) const { if (!tmpDst.allocPixels(alloc, ctable)) { return false; } - + if (!tmpDst.readyToDraw()) { // allocator/lock failed return false; } - + /* do memcpy for the same configs cases, else use drawing */ if (src->config() == dstConfig) { |