| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 auto surfaceTransparent(SkSurface::MakeRaster(infoTransparent)); | 65 auto surfaceTransparent(SkSurface::MakeRaster(infoTransparent)); |
| 66 check_isopaque(reporter, surfaceTransparent, false); | 66 check_isopaque(reporter, surfaceTransparent, false); |
| 67 | 67 |
| 68 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType); | 68 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType); |
| 69 auto surfaceOpaque(SkSurface::MakeRaster(infoOpaque)); | 69 auto surfaceOpaque(SkSurface::MakeRaster(infoOpaque)); |
| 70 check_isopaque(reporter, surfaceOpaque, true); | 70 check_isopaque(reporter, surfaceOpaque, true); |
| 71 } | 71 } |
| 72 | 72 |
| 73 #if SK_SUPPORT_GPU | 73 #if SK_SUPPORT_GPU |
| 74 | 74 |
| 75 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageIsOpaqueTest_Gpu, reporter, ctxInfo)
{ | 75 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageIsOpaqueTest_Gpu, reporter, ctxInfo) { |
| 76 GrContext* context = ctxInfo.grContext(); | 76 GrContext* context = ctxInfo.grContext(); |
| 77 SkImageInfo infoTransparent = SkImageInfo::MakeN32Premul(5, 5); | 77 SkImageInfo infoTransparent = SkImageInfo::MakeN32Premul(5, 5); |
| 78 auto surfaceTransparent(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo
, infoTransparent)); | 78 auto surfaceTransparent(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo
, infoTransparent)); |
| 79 check_isopaque(reporter, surfaceTransparent, false); | 79 check_isopaque(reporter, surfaceTransparent, false); |
| 80 | 80 |
| 81 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType); | 81 SkImageInfo infoOpaque = SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType); |
| 82 auto surfaceOpaque(SkSurface::MakeRenderTarget(context,SkBudgeted::kNo, info
Opaque)); | 82 auto surfaceOpaque(SkSurface::MakeRenderTarget(context,SkBudgeted::kNo, info
Opaque)); |
| 83 | 83 |
| 84 check_isopaque(reporter, surfaceOpaque, true); | 84 check_isopaque(reporter, surfaceOpaque, true); |
| 85 } | 85 } |
| 86 | 86 |
| 87 #endif | 87 #endif |
| OLD | NEW |