merge from android tree:
- optional parameters added to descriptorProc and allocPixels
- clip options to image decoders
- check for xfermode in blitter_a8
- UNROLL loops in blitrow
reviewed by reed@google.com
git-svn-id: http://skia.googlecode.com/svn/trunk@841 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/images/SkImageRef.cpp b/src/images/SkImageRef.cpp
index 16c2820..7d2d416 100644
--- a/src/images/SkImageRef.cpp
+++ b/src/images/SkImageRef.cpp
@@ -57,6 +57,16 @@
return true;
}
+bool SkImageRef::isOpaque(SkBitmap* bitmap) {
+ if (bitmap && bitmap->pixelRef() == this) {
+ bitmap->lockPixels();
+ bitmap->setIsOpaque(fBitmap.isOpaque());
+ bitmap->unlockPixels();
+ return true;
+ }
+ return false;
+}
+
SkImageDecoderFactory* SkImageRef::setDecoderFactory(
SkImageDecoderFactory* fact) {
SkRefCnt_SafeAssign(fFactory, fact);