Goal: ensure we always balance lock/unlock pixels calls.
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 13 Dec 2012 21:39:56 +0000 (21:39 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 13 Dec 2012 21:39:56 +0000 (21:39 +0000)
commit1adcf8859cc9414591038e440e3f22382c8e4aa0
tree9a7326ace2054faecd8ca907e90188b412be7b54
parent9f13174da5295e88d447f29740318003b9cec9c3
Goal: ensure we always balance lock/unlock pixels calls.

A big caller of lockPixels is setContext in the bitmapshader.

This change replaces beginSession/endSession with adding endContext(), and
adds debugging code to ensure that
1. setContext calls are never nested
2. endContext is always called after each setContext call.
Review URL: https://codereview.appspot.com/6937046

git-svn-id: http://skia.googlecode.com/svn/trunk@6798 2bbb7eff-a529-9590-31e7-b0007b416f81
13 files changed:
include/core/SkComposeShader.h
include/core/SkShader.h
src/core/SkBitmapProcShader.cpp
src/core/SkBitmapProcShader.h
src/core/SkBlitter.cpp
src/core/SkColorFilter.cpp
src/core/SkComposeShader.cpp
src/core/SkDraw.cpp
src/core/SkFilterShader.h
src/core/SkShader.cpp
src/effects/gradients/SkGradientShader.cpp
src/effects/gradients/SkGradientShaderPriv.h
src/effects/gradients/SkTwoPointRadialGradient.cpp