Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1027)

Issue 5307045: Virtualize SkGLContext with subclasses SkNativeGLContext and SkMesaGLContext, allow both in gm (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by bsalomon
Modified:
13 years, 1 month ago
Reviewers:
bungeman, epoger, reed1
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Goal: Support multiple kinds of GL contexts within same build for various testing purposes. Mesa for consistent images, null context to cpu profile the gpu backend, validation context that checks for GL object leaks, etc. Top level view of this change: 1) Adds some new GL functions to GrGLInterface needed by other parts of the change (finish, flush, queries). 2) Distinguishes between the "native" and "default" GrGLInterface. This allows us to create a native GL interface whether or it is not the default. The GrGLDefaultInterface_*.cpp files are now GrGLCreateNativeInterface_*.cpp Two new files GrGLDefaultInterface_none.cpp and GrGLDefaultInterface_native.cpp allow having no default (chrome) or using the native as the default (internal apps). 3) Virtualizes SkGLContext so that we can have multiple implementations in the same build. Currently two types: native, mesa. Future change: null gl context and validating gl contexts. 4) Enable osmesa in gm without requiring a rebuild (--mesagl switch) All mesa code is protected by gyp var skia_mesa, since not all Mac and Linux machines have the necessary library. Tested gm on mac and linux with the --mesagl flag. The images look correct. Once this is in I'd like to enable skia_mesa=1 on the mac and linux bots right away to keep it from bit rotting.

Patch Set 1 #

Total comments: 2

Patch Set 2 : update #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+838 lines, -2264 lines) Patch
M bench/BenchGpuTimer_gl.h View 1 chunk +5 lines, -19 lines 0 comments Download
M bench/BenchGpuTimer_gl.cpp View 2 chunks +39 lines, -161 lines 0 comments Download
D bench/BenchGpuTimer_none.h View 1 chunk +0 lines, -19 lines 0 comments Download
D bench/BenchGpuTimer_none.cpp View 1 chunk +0 lines, -21 lines 0 comments Download
M bench/BenchTimer.h View 2 chunks +6 lines, -1 line 0 comments Download
M bench/BenchTimer.cpp View 1 chunk +20 lines, -20 lines 0 comments Download
M bench/benchmain.cpp View 1 5 chunks +10 lines, -6 lines 0 comments Download
M gm/gmmain.cpp View 1 7 chunks +28 lines, -5 lines 0 comments Download
M gyp/bench.gypi View 2 chunks +0 lines, -13 lines 2 comments Download
M gyp/common.gypi View 2 chunks +12 lines, -0 lines 0 comments Download
M gyp/common_variables.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M gyp/gpu.gyp View 1 6 chunks +52 lines, -16 lines 0 comments Download
M include/gpu/GrGLDefines.h View 1 chunk +13 lines, -0 lines 0 comments Download
M include/gpu/GrGLInterface.h View 11 chunks +34 lines, -4 lines 0 comments Download
M include/gpu/SkGLContext.h View 1 chunk +32 lines, -34 lines 0 comments Download
A include/gpu/SkMesaGLContext.h View 1 chunk +35 lines, -0 lines 0 comments Download
A include/gpu/SkNativeGLContext.h View 1 chunk +51 lines, -0 lines 0 comments Download
A src/gpu/GrGLCreateNativeInterface_none.cpp View 1 chunk +13 lines, -0 lines 0 comments Download
A src/gpu/GrGLDefaultInterface_native.cpp View 1 chunk +13 lines, -0 lines 0 comments Download
M src/gpu/GrGLInterface.cpp View 2 chunks +28 lines, -0 lines 0 comments Download
M src/gpu/GrGLProgram.h View 1 chunk +14 lines, -3 lines 0 comments Download
M src/gpu/GrGLProgram.cpp View 4 chunks +7 lines, -7 lines 0 comments Download
M src/gpu/GrGpuGLShaders.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
A + src/gpu/SkGLContext.cpp View 1 1 chunk +52 lines, -1 line 0 comments Download
D src/gpu/SkGLContext_none.cpp View 1 chunk +0 lines, -19 lines 0 comments Download
A + src/gpu/mac/GrGLCreateNativeInterface_mac.cpp View 7 chunks +29 lines, -7 lines 0 comments Download
D src/gpu/mac/GrGLDefaultInterface_mac.cpp View 1 chunk +0 lines, -170 lines 0 comments Download
D src/gpu/mac/SkGLContext_mac.cpp View 1 chunk +0 lines, -77 lines 0 comments Download
A + src/gpu/mac/SkNativeGLContext_mac.cpp View 2 chunks +35 lines, -48 lines 0 comments Download
A + src/gpu/mesa/GrGLCreateMesaInterface.cpp View 3 chunks +74 lines, -54 lines 0 comments Download
D src/gpu/mesa/GrGLDefaultInterface_mesa.cpp View 1 chunk +0 lines, -188 lines 0 comments Download
D src/gpu/mesa/SkGLContext_mesa.cpp View 1 chunk +0 lines, -137 lines 0 comments Download
A + src/gpu/mesa/SkMesaGLContext.cpp View 1 1 chunk +51 lines, -102 lines 0 comments Download
A + src/gpu/unix/GrGLCreateNativeInterface_unix.cpp View 5 chunks +20 lines, -1 line 0 comments Download
D src/gpu/unix/GrGLDefaultInterface_unix.cpp View 1 chunk +0 lines, -191 lines 0 comments Download
D src/gpu/unix/SkGLContext_unix.cpp View 1 chunk +0 lines, -275 lines 0 comments Download
A + src/gpu/unix/SkNativeGLContext_unix.cpp View 1 7 chunks +76 lines, -106 lines 0 comments Download
A + src/gpu/win/GrGLCreateNativeInterface_win.cpp View 3 chunks +4 lines, -2 lines 0 comments Download
D src/gpu/win/GrGLDefaultInterface_win.cpp View 1 chunk +0 lines, -197 lines 0 comments Download
D src/gpu/win/SkGLContext_win.cpp View 1 chunk +0 lines, -202 lines 0 comments Download
A + src/gpu/win/SkNativeGLContext_win.cpp View 1 chunk +75 lines, -151 lines 0 comments Download
M tests/Test.cpp View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 4
bsalomon
http://codereview.appspot.com/5307045/diff/1/src/gpu/GrGLProgram.h File src/gpu/GrGLProgram.h (right): http://codereview.appspot.com/5307045/diff/1/src/gpu/GrGLProgram.h#newcode44 src/gpu/GrGLProgram.h:44: k110_GLSLVersion, The osmesa on either mac or linux (can't ...
13 years, 1 month ago (2011-10-19 18:56:41 UTC) #1
bungeman
Other than the one comment, LGTM. http://codereview.appspot.com/5307045/diff/1/bench/benchmain.cpp File bench/benchmain.cpp (right): http://codereview.appspot.com/5307045/diff/1/bench/benchmain.cpp#newcode508 bench/benchmain.cpp:508: timer.start(); Doesn't look ...
13 years, 1 month ago (2011-10-19 20:23:06 UTC) #2
epoger
gyp files LGTM http://codereview.appspot.com/5307045/diff/3002/gyp/bench.gypi File gyp/bench.gypi (left): http://codereview.appspot.com/5307045/diff/3002/gyp/bench.gypi#oldcode65 gyp/bench.gypi:65: 'sources!': [ Casually wondering... When was ...
13 years, 1 month ago (2011-10-19 21:41:26 UTC) #3
bsalomon
13 years, 1 month ago (2011-10-20 13:28:47 UTC) #4
Closed with r's 2499, 2500, 2501, and finally 2505.

http://codereview.appspot.com/5307045/diff/3002/gyp/bench.gypi
File gyp/bench.gypi (left):

http://codereview.appspot.com/5307045/diff/3002/gyp/bench.gypi#oldcode65
gyp/bench.gypi:65: 'sources!': [
On 2011/10/19 21:41:26, epoger wrote:
> Casually wondering... When was this section ever active?  (what skia_os is not
> one of win, mac, linux, freebsd, openbsd, solaris?)  iOS, I guess?

I guess, but dunno.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b