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

Side by Side Diff: tests/GpuDrawPathTest.cpp

Issue 319043005: Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 29 matching lines...) Expand all
40 canvas->drawRRect(SkRRect(), paint); 40 canvas->drawRRect(SkRRect(), paint);
41 } 41 }
42 42
43 43
44 DEF_GPUTEST(GpuDrawPath, reporter, factory) { 44 DEF_GPUTEST(GpuDrawPath, reporter, factory) {
45 return; 45 return;
46 46
47 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { 47 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
48 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); 48 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
49 49
50 GrContext* grContext = factory->get(glType); 50 GrContext* grContext = factory->get(glType, kNone_GrGLStandard);
51 if (NULL == grContext) { 51 if (NULL == grContext) {
52 continue; 52 continue;
53 } 53 }
54 static const int sampleCounts[] = { 0, 4, 16 }; 54 static const int sampleCounts[] = { 0, 4, 16 };
55 55
56 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) { 56 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) {
57 const int W = 255; 57 const int W = 255;
58 const int H = 255; 58 const int H = 255;
59 59
60 GrTextureDesc desc; 60 GrTextureDesc desc;
61 desc.fConfig = kSkia8888_GrPixelConfig; 61 desc.fConfig = kSkia8888_GrPixelConfig;
62 desc.fFlags = kRenderTarget_GrTextureFlagBit; 62 desc.fFlags = kRenderTarget_GrTextureFlagBit;
63 desc.fWidth = W; 63 desc.fWidth = W;
64 desc.fHeight = H; 64 desc.fHeight = H;
65 desc.fSampleCnt = sampleCounts[i]; 65 desc.fSampleCnt = sampleCounts[i];
66 SkAutoTUnref<GrTexture> texture(grContext->createUncachedTexture(des c, NULL, 0)); 66 SkAutoTUnref<GrTexture> texture(grContext->createUncachedTexture(des c, NULL, 0));
67 SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice, (grContext, texture.get()))); 67 SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice, (grContext, texture.get())));
68 SkCanvas drawingCanvas(device.get()); 68 SkCanvas drawingCanvas(device.get());
69 69
70 test_drawPathEmpty(reporter, &drawingCanvas); 70 test_drawPathEmpty(reporter, &drawingCanvas);
71 } 71 }
72 } 72 }
73 } 73 }
74 74
75 #endif 75 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698