Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: src/core/SkBitmap.cpp

Issue 93703004: Change SkDecodingImageGenerator API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 1 Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 7a7f690b2a5159ac1c09ff744adf62a36ba6df6e..8515ebd654b32ca7bda2ab14ec685cc896c9fd2f 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -222,6 +222,16 @@ size_t SkBitmap::ComputeSize(Config c, int width, int height) {
return isPos32Bits(size) ? size.get32() : 0;
}
+Sk64 SkBitmap::ComputeSize64(const SkImageInfo& info) {
+ return SkBitmap::ComputeSize64(SkImageInfoToBitmapConfig(info),
+ info.fWidth, info.fHeight);
+}
+
+size_t SkBitmap::ComputeSize(const SkImageInfo& info) {
+ return SkBitmap::ComputeSize(SkImageInfoToBitmapConfig(info),
+ info.fWidth, info.fHeight);
+}
+
Sk64 SkBitmap::ComputeSafeSize64(Config config,
uint32_t width,
uint32_t height,
@@ -536,7 +546,7 @@ bool SkBitmap::HeapAllocator::allocPixelRef(SkBitmap* dst,
// SkDebugf("unsupported config for info %d\n", dst->config());
return false;
}
-
+
SkPixelRef* pr = SkMallocPixelRef::NewAllocate(info, dst->rowBytes(),
ctable);
if (NULL == pr) {

Powered by Google App Engine
This is Rietveld 408576698