fast return if no part of the paint gets replaced
authormike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sat, 9 Apr 2011 18:54:08 +0000 (18:54 +0000)
committermike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sat, 9 Apr 2011 18:54:08 +0000 (18:54 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@1088 2bbb7eff-a529-9590-31e7-b0007b416f81

src/effects/SkLayerDrawLooper.cpp

index ee0fc98..db64133 100644 (file)
@@ -35,6 +35,9 @@ void SkLayerDrawLooper::init(SkCanvas* canvas) {
 
 void SkLayerDrawLooper::ApplyBits(SkPaint* dst, const SkPaint& src,
                                   BitFlags bits) {
+    if (0 == bits) {
+        return;
+    }
     if (kEntirePaint_Bits == bits) {
         *dst = src;
         return;