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

Side by Side Diff: tests/ImageNewShaderTest.cpp

Issue 398183002: Fix alpha textures in NV ES3 contexts on Windows (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: suppress warning Created 6 years, 5 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/GrContextFactoryTest.cpp ('k') | tests/PictureTest.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 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 #include "GrContextFactory.h" 10 #include "GrContextFactory.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { 85 void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) {
86 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); 86 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
87 87
88 SkAutoTUnref<SkSurface> srcSurface(SkSurface::NewRaster(info)); 88 SkAutoTUnref<SkSurface> srcSurface(SkSurface::NewRaster(info));
89 SkAutoTUnref<SkSurface> dstSurface(SkSurface::NewRenderTarget(context, info) ); 89 SkAutoTUnref<SkSurface> dstSurface(SkSurface::NewRenderTarget(context, info) );
90 90
91 runShaderTest(reporter, srcSurface.get(), dstSurface.get(), info); 91 runShaderTest(reporter, srcSurface.get(), dstSurface.get(), info);
92 } 92 }
93 93
94 DEF_GPUTEST(ImageNewShader_GPU, reporter, factory) { 94 DEF_GPUTEST(ImageNewShader_GPU, reporter, factory) {
95 GrContext* context = factory->get(GrContextFactory::kNative_GLContextType); 95 for (int i= 0; i < GrContextFactory::kGLContextTypeCnt; ++i) {
96 GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContext Type) i;
96 97
97 // GPU -> GPU 98 if (!GrContextFactory::IsRenderingGLContext(glCtxType)) {
98 gpuToGpu(reporter, context); 99 continue;
100 }
99 101
100 // GPU -> RASTER 102 GrContext* context = factory->get(glCtxType);
101 gpuToRaster(reporter, context); 103
104 if (NULL == context) {
105 continue;
106 }
107
108 // GPU -> GPU
109 gpuToGpu(reporter, context);
110
111 // GPU -> RASTER
112 gpuToRaster(reporter, context);
102 113
103 114
104 // RASTER -> GPU 115 // RASTER -> GPU
105 rasterToGpu(reporter, context); 116 rasterToGpu(reporter, context);
117 }
106 } 118 }
107 119
108 #endif 120 #endif
OLDNEW
« no previous file with comments | « tests/GrContextFactoryTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698