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

Unified Diff: src/core/SkBitmap.cpp

Issue 54203006: Break up SkLazyPixelRef functionally into class hierarchy. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: last change Created 7 years, 1 month 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
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index bff08801fc1cf069ed8ada3607d7bcd8dfb5117d..2fae75ae3841dd39d53c305ee83f70b8ae806fe5 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -11,6 +11,7 @@
#include "SkColorPriv.h"
#include "SkDither.h"
#include "SkFlattenable.h"
+#include "SkImagePriv.h"
#include "SkMallocPixelRef.h"
#include "SkMask.h"
#include "SkOrderedReadBuffer.h"
@@ -332,6 +333,11 @@ BAD_CONFIG:
return false;
}
+bool SkBitmap::setConfig(const SkImageInfo& info, size_t rowBytes) {
+ return this->setConfig(SkImageInfoToBitmapConfig(info), info.fWidth,
+ info.fHeight, rowBytes, info.fAlphaType);
+}
+
bool SkBitmap::setAlphaType(SkAlphaType alphaType) {
if (!validate_alphaType(this->config(), alphaType, &alphaType)) {
return false;
« no previous file with comments | « include/core/SkImage.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698