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

Unified Diff: src/image/SkImagePriv.h

Issue 108663004: make info real in SkPixelRef, and add bitmap::asImageInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/image/SkImagePriv.h
diff --git a/src/image/SkImagePriv.h b/src/image/SkImagePriv.h
index 188b16d530fef1f9124d0bbb19ee6085e16a1e2a..bf28f598c50f85c654270d16ff43b5715c23453c 100644
--- a/src/image/SkImagePriv.h
+++ b/src/image/SkImagePriv.h
@@ -15,10 +15,6 @@ class SkPicture;
extern SkBitmap::Config SkImageInfoToBitmapConfig(const SkImageInfo&);
-extern int SkImageBytesPerPixel(SkColorType);
-
-extern bool SkBitmapToImageInfo(const SkBitmap&, SkImageInfo*);
-
// Call this if you explicitly want to use/share this pixelRef in the image
extern SkImage* SkNewImageFromPixelRef(const SkImageInfo&, SkPixelRef*,
size_t rowBytes);
@@ -48,8 +44,7 @@ extern void SkImagePrivDrawPicture(SkCanvas*, SkPicture*,
extern SkImage* SkNewImageFromPicture(const SkPicture*);
static inline size_t SkImageMinRowBytes(const SkImageInfo& info) {
- size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType);
- return SkAlign4(rb);
+ return SkAlign4(info.minRowBytes());
scroggo 2013/12/09 21:33:41 Why is this function different (from minRowBytes()
reed1 2013/12/09 21:46:14 Don't know. I was just keeping the old behavior.
}
// Given an image created from SkNewImageFromBitmap, return its pixelref. This
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/image/SkImagePriv.cpp » ('j') | tests/PixelRefTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698