check for gl-canvas before calling GL

git-svn-id: http://skia.googlecode.com/svn/trunk@480 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2010-01-25 22:09:16 +00:00
parent e83b532b2b
commit 1eadb955be

View File

@ -202,9 +202,11 @@ protected:
virtual void onDraw(SkCanvas* canvas) { virtual void onDraw(SkCanvas* canvas) {
drawBG(canvas); drawBG(canvas);
test_glshader(canvas); if (canvas->getViewport(NULL)) {
return; test_glshader(canvas);
return;
}
SkRect r; SkRect r;
r.set(0, 0, 100, 100); r.set(0, 0, 100, 100);