OLD | NEW |
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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkConfig8888.h" | 9 #include "SkConfig8888.h" |
10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); | 101 const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); |
102 | 102 |
103 sk_sp<SkSurface> surf(SkSurface::MakeRaster(info)); | 103 sk_sp<SkSurface> surf(SkSurface::MakeRaster(info)); |
104 | 104 |
105 test_premul_alpha_roundtrip(reporter, surf.get()); | 105 test_premul_alpha_roundtrip(reporter, surf.get()); |
106 } | 106 } |
107 #if SK_SUPPORT_GPU | 107 #if SK_SUPPORT_GPU |
108 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(PremulAlphaRoundTrip_Gpu, reporter, ctxInfo)
{ | 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 | 110 |
111 sk_sp<SkSurface> surf(SkSurface::MakeRenderTarget(ctxInfo.fGrContext, | 111 sk_sp<SkSurface> surf(SkSurface::MakeRenderTarget(ctxInfo.grContext(), |
112 SkBudgeted::kNo, | 112 SkBudgeted::kNo, |
113 info)); | 113 info)); |
114 test_premul_alpha_roundtrip(reporter, surf.get()); | 114 test_premul_alpha_roundtrip(reporter, surf.get()); |
115 } | 115 } |
116 #endif | 116 #endif |
OLD | NEW |