aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2017-04-11 15:37:50 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-11 15:38:04 +0000
commit7bfdfda809e7273d7c962cc62ef9390b5007fb5a (patch)
treeada1ecb46c18c53df551352b0781970de145d929 /include
parenta4db9be6a28c3a2c24c31e721ac804aec47ad379 (diff)
Revert "remove unused SkBitmap::copyPixelsTo"
This reverts commit 0f3fdfacf32261f943dcac5cdfd14475011f40db. Reason for revert: Blink-headless in Google3 needs an update too. Original change's description: > remove unused SkBitmap::copyPixelsTo > > Needs https://codereview.chromium.org/2812853002/ to land first > > Bug: skia:6465 > Change-Id: I531e33b2848cd995f20844786ed1a8d34d63fb64 > Reviewed-on: https://skia-review.googlesource.com/13171 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5e7c4b0d05772e4948cb1dffdcc40e095fbdba41 Reviewed-on: https://skia-review.googlesource.com/13185 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkBitmap.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 0fcfa2b24c..34da542edd 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -345,6 +345,27 @@ public:
*/
void setPixels(void* p, SkColorTable* ctable = NULL);
+ /** Copies the bitmap's pixels to the location pointed at by dst and returns
+ true if possible, returns false otherwise.
+
+ In the case when the dstRowBytes matches the bitmap's rowBytes, the copy
+ may be made faster by copying over the dst's per-row padding (for all
+ rows but the last). By setting preserveDstPad to true the caller can
+ disable this optimization and ensure that pixels in the padding are not
+ overwritten.
+
+ Always returns false for RLE formats.
+
+ @param dst Location of destination buffer.
+ @param dstSize Size of destination buffer. Must be large enough to hold
+ pixels using indicated stride.
+ @param dstRowBytes Width of each line in the buffer. If 0, uses
+ bitmap's internal stride.
+ @param preserveDstPad Must we preserve padding in the dst
+ */
+ bool copyPixelsTo(void* const dst, size_t dstSize, size_t dstRowBytes = 0,
+ bool preserveDstPad = false) const;
+
/** Use the standard HeapAllocator to create the pixelref that manages the
pixel memory. It will be sized based on the current ImageInfo.
If this is called multiple times, a new pixelref object will be created