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

Side by Side Diff: tests/PremulAlphaRoundTripTest.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/ImageTest.cpp ('k') | tests/PrimitiveProcessorTest.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkConfig8888.h" 10 #include "SkConfig8888.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 } 99 }
100 100
101 DEF_TEST(PremulAlphaRoundTrip, reporter) { 101 DEF_TEST(PremulAlphaRoundTrip, reporter) {
102 const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); 102 const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256);
103 SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType); 103 SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
104 SkAutoTUnref<SkBaseDevice> device(SkBitmapDevice::Create(info, props)); 104 SkAutoTUnref<SkBaseDevice> device(SkBitmapDevice::Create(info, props));
105 test_premul_alpha_roundtrip(reporter, device); 105 test_premul_alpha_roundtrip(reporter, device);
106 } 106 }
107 #if SK_SUPPORT_GPU 107 #if SK_SUPPORT_GPU
108 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(PremulAlphaRoundTrip_Gpu, reporter, context) { 108 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(PremulAlphaRoundTrip_Gpu, reporter, ctxInfo) {
109 const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); 109 const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256);
110 SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType); 110 SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
111 SkAutoTUnref<SkBaseDevice> device( 111 SkAutoTUnref<SkBaseDevice> device(
112 SkGpuDevice::Create(context, SkBudgeted::kNo, info, 0, &props, 112 SkGpuDevice::Create(ctxInfo.fGrContext, SkBudgeted::kNo, info, 0, &props ,
113 SkGpuDevice::kUninit_InitContents)); 113 SkGpuDevice::kUninit_InitContents));
114 test_premul_alpha_roundtrip(reporter, device); 114 test_premul_alpha_roundtrip(reporter, device);
115 } 115 }
116 #endif 116 #endif
OLDNEW
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/PrimitiveProcessorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698