Keep at most one GPU device alive at a time.
authormtklein <mtklein@chromium.org>
Tue, 15 Jul 2014 21:38:53 +0000 (14:38 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 15 Jul 2014 21:38:53 +0000 (14:38 -0700)
NOTREECHECKS=true

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/392013004

tests/PremulAlphaRoundTripTest.cpp

index af041ce..492a4aa 100644 (file)
@@ -67,7 +67,6 @@ static void fillCanvas(SkCanvas* canvas, SkColorType colorType, PackUnpremulProc
 DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) {
     const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256);
 
-    SkAutoTUnref<SkBaseDevice> device;
     for (int dtype = 0; dtype < 2; ++dtype) {
 
         int glCtxTypeCnt = 1;
@@ -77,6 +76,7 @@ DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) {
         }
 #endif
         for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) {
+            SkAutoTUnref<SkBaseDevice> device;
             if (0 == dtype) {
                 device.reset(SkBitmapDevice::Create(info));
             } else {