Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: tests/ImageIsOpaqueTest.cpp

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/ImageNewShaderTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #include "Test.h" 9 #include "Test.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 auto surfaceTransparent(SkSurface::MakeRaster(infoTransparent)); 59 auto surfaceTransparent(SkSurface::MakeRaster(infoTransparent));
60 check_isopaque(reporter, surfaceTransparent, false); 60 check_isopaque(reporter, surfaceTransparent, false);
61 61
62 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType); 62 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType);
63 auto surfaceOpaque(SkSurface::MakeRaster(infoOpaque)); 63 auto surfaceOpaque(SkSurface::MakeRaster(infoOpaque));
64 check_isopaque(reporter, surfaceOpaque, true); 64 check_isopaque(reporter, surfaceOpaque, true);
65 } 65 }
66 66
67 #if SK_SUPPORT_GPU 67 #if SK_SUPPORT_GPU
68 68
69 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageIsOpaqueTest_Gpu, reporter, context) { 69 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageIsOpaqueTest_Gpu, reporter, ctxInfo) {
70 GrContext* context = ctxInfo.fGrContext;
70 SkImageInfo infoTransparent = SkImageInfo::MakeN32Premul(5, 5); 71 SkImageInfo infoTransparent = SkImageInfo::MakeN32Premul(5, 5);
71 auto surfaceTransparent(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo , infoTransparent)); 72 auto surfaceTransparent(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo , infoTransparent));
72 check_isopaque(reporter, surfaceTransparent, false); 73 check_isopaque(reporter, surfaceTransparent, false);
73 74
74 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType); 75 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType);
75 auto surfaceOpaque(SkSurface::MakeRenderTarget(context,SkBudgeted::kNo, info Opaque)); 76 auto surfaceOpaque(SkSurface::MakeRenderTarget(context,SkBudgeted::kNo, info Opaque));
76 77
77 check_isopaque(reporter, surfaceOpaque, true); 78 check_isopaque(reporter, surfaceOpaque, true);
78 } 79 }
79 80
80 #endif 81 #endif
OLDNEW
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/ImageNewShaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698