diff options
author | Hal Canary <halcanary@google.com> | 2017-12-14 21:13:47 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-09 16:46:22 +0000 |
commit | 99578d24c0abd5b0e4fa2fc40b44fbec0c2bd627 (patch) | |
tree | 0a1f00691905194d45e70aeea82835c0b2661407 /src/core/SkPixmapPriv.h | |
parent | 7e6dc6394518252ae6acd56eea0ac2d19fbc361b (diff) |
SkBitmap now *has* a SkPixmap.
Before:
class SkBitmap {
sk_sp<SkPixelRef> fPixelRef;
void* fPixels;
SkImageInfo fInfo;
uint32_t fRowBytes;
uint8_t fFlags;
};
After:
class SkBitmap {
sk_sp<SkPixelRef> fPixelRef;
SkPixmap fPixmap;
uint8_t fFlags;
};
Change-Id: I62d59ca3e702b7adea022cd3cfbf0cc3186af957
Reviewed-on: https://skia-review.googlesource.com/85560
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'src/core/SkPixmapPriv.h')
-rw-r--r-- | src/core/SkPixmapPriv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkPixmapPriv.h b/src/core/SkPixmapPriv.h index 9941862676..cced3e20b9 100644 --- a/src/core/SkPixmapPriv.h +++ b/src/core/SkPixmapPriv.h @@ -63,6 +63,11 @@ public: } return true; } + + static void ResetPixmapKeepInfo(SkPixmap* pm, const void* address, size_t rowBytes) { + pm->fRowBytes = rowBytes; + pm->fPixels = address; + } }; #endif |