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

Side by Side Diff: src/gpu/GrContextFactory.cpp

Issue 1338003002: skia: Add ANGLE with GL backend to nanobench/DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove PictureRenderer changes Created 5 years, 3 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 | « src/gpu/GrContextFactory.h ('k') | src/gpu/gl/angle/SkANGLEGLContext.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContextFactory.h" 9 #include "GrContextFactory.h"
10 10
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 SkAutoTUnref<SkGLContext> glCtx; 37 SkAutoTUnref<SkGLContext> glCtx;
38 SkAutoTUnref<GrContext> grCtx; 38 SkAutoTUnref<GrContext> grCtx;
39 switch (type) { 39 switch (type) {
40 case kNVPR_GLContextType: // fallthru 40 case kNVPR_GLContextType: // fallthru
41 case kNative_GLContextType: 41 case kNative_GLContextType:
42 glCtx.reset(SkCreatePlatformGLContext(forcedGpuAPI)); 42 glCtx.reset(SkCreatePlatformGLContext(forcedGpuAPI));
43 break; 43 break;
44 #ifdef SK_ANGLE 44 #ifdef SK_ANGLE
45 case kANGLE_GLContextType: 45 case kANGLE_GLContextType:
46 glCtx.reset(SkANGLEGLContext::Create(forcedGpuAPI)); 46 glCtx.reset(SkANGLEGLContext::Create(forcedGpuAPI, false));
47 break;
48 case kANGLE_GL_GLContextType:
49 glCtx.reset(SkANGLEGLContext::Create(forcedGpuAPI, true));
47 break; 50 break;
48 #endif 51 #endif
49 #ifdef SK_COMMAND_BUFFER 52 #ifdef SK_COMMAND_BUFFER
50 case kCommandBuffer_GLContextType: 53 case kCommandBuffer_GLContextType:
51 glCtx.reset(SkCommandBufferGLContext::Create(forcedGpuAPI)); 54 glCtx.reset(SkCommandBufferGLContext::Create(forcedGpuAPI));
52 break; 55 break;
53 #endif 56 #endif
54 #ifdef SK_MESA 57 #ifdef SK_MESA
55 case kMESA_GLContextType: 58 case kMESA_GLContextType:
56 glCtx.reset(SkMesaGLContext::Create(forcedGpuAPI)); 59 glCtx.reset(SkMesaGLContext::Create(forcedGpuAPI));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 115 }
113 116
114 GPUContext& ctx = fContexts.push_back(); 117 GPUContext& ctx = fContexts.push_back();
115 ctx.fGLContext = glCtx.get(); 118 ctx.fGLContext = glCtx.get();
116 ctx.fGLContext->ref(); 119 ctx.fGLContext->ref();
117 ctx.fGrContext = grCtx.get(); 120 ctx.fGrContext = grCtx.get();
118 ctx.fGrContext->ref(); 121 ctx.fGrContext->ref();
119 ctx.fType = type; 122 ctx.fType = type;
120 return ctx.fGrContext; 123 return ctx.fGrContext;
121 } 124 }
OLDNEW
« no previous file with comments | « src/gpu/GrContextFactory.h ('k') | src/gpu/gl/angle/SkANGLEGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698