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

Issue 630843002: Make the Sk GL context class an abstract base class (Closed)

Created:
6 years, 2 months ago by Kimmo Kinnunen
Modified:
6 years, 2 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Make the Sk GL context class an abstract base class Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, it depended on ifdefs to implement the platform dependent polymorphism. Move the logic to subclasses of the various platform implementations. This a step to enable Skia embedders to compile dm and bench_pictures. The concrete goal is to support running these test apps with Chromium command buffer. With this change, Chromium can implement its own version of SkGLNativeContext that uses command buffer, and host the implementation in its own repository. Implements the above by renaming the SkGLContextHelper to SkGLContext and removing the unneeded SkGLNativeContext. Also removes SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: no use in Skia code, and no tests. BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8 Committed: https://skia.googlesource.com/skia/+/9e61bb7815b133bc40ea7b00fccc853f4b728e3c

Patch Set 1 #

Total comments: 1

Patch Set 2 : address review comments #

Patch Set 3 : fix angle build #

Patch Set 4 : update comment #

Patch Set 5 : fix android link problem and ios compile problem #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -1378 lines) Patch
M bench/nanobench.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M gyp/gpu.gypi View 1 3 3 chunks +8 lines, -9 lines 0 comments Download
M gyp/public_headers.gypi View 1 1 chunk +1 line, -2 lines 0 comments Download
M include/gpu/GrContextFactory.h View 1 4 chunks +5 lines, -5 lines 0 comments Download
M include/gpu/gl/SkANGLEGLContext.h View 2 chunks +2 lines, -13 lines 0 comments Download
M include/gpu/gl/SkDebugGLContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
A + include/gpu/gl/SkGLContext.h View 1 2 3 3 chunks +14 lines, -6 lines 0 comments Download
D include/gpu/gl/SkGLContextHelper.h View 1 chunk +0 lines, -95 lines 0 comments Download
M include/gpu/gl/SkMesaGLContext.h View 1 2 chunks +2 lines, -15 lines 0 comments Download
D include/gpu/gl/SkNativeGLContext.h View 1 chunk +0 lines, -111 lines 0 comments Download
M include/gpu/gl/SkNullGLContext.h View 1 chunk +2 lines, -2 lines 0 comments Download
A + src/gpu/gl/SkGLContext.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
D src/gpu/gl/SkGLContextHelper.cpp View 1 chunk +0 lines, -142 lines 0 comments Download
M src/gpu/gl/angle/SkANGLEGLContext.cpp View 1 2 1 chunk +0 lines, -15 lines 0 comments Download
M src/gpu/gl/debug/GrGLCreateDebugInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
A + src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp View 1 2 3 4 3 chunks +33 lines, -18 lines 0 comments Download
M src/gpu/gl/egl/SkNativeGLContext_egl.cpp View 1 1 chunk +0 lines, -182 lines 0 comments Download
A + src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp View 1 4 chunks +58 lines, -20 lines 0 comments Download
M src/gpu/gl/glx/SkNativeGLContext_glx.cpp View 1 1 chunk +0 lines, -288 lines 0 comments Download
A + src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm View 1 2 3 4 3 chunks +30 lines, -20 lines 0 comments Download
M src/gpu/gl/iOS/SkNativeGLContext_iOS.mm View 1 1 chunk +0 lines, -71 lines 0 comments Download
A + src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp View 1 2 chunks +29 lines, -14 lines 0 comments Download
M src/gpu/gl/mac/SkNativeGLContext_mac.cpp View 1 1 chunk +0 lines, -84 lines 0 comments Download
M src/gpu/gl/mesa/SkMesaGLContext.cpp View 1 1 chunk +0 lines, -18 lines 0 comments Download
A src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp View 1 1 chunk +60 lines, -0 lines 0 comments Download
M src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp View 1 1 chunk +0 lines, -37 lines 0 comments Download
A + src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp View 1 5 chunks +38 lines, -16 lines 0 comments Download
M src/gpu/gl/win/SkNativeGLContext_win.cpp View 1 1 chunk +0 lines, -165 lines 0 comments Download
M tests/GLInterfaceValidationTest.cpp View 1 chunk +5 lines, -5 lines 0 comments Download
M tests/Test.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/PictureRenderer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/PictureRenderer.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/timer/GpuTimer.h View 1 chunk +3 lines, -3 lines 0 comments Download
M tools/timer/GpuTimer.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/timer/Timer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/timer/Timer.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (3 generated)
Kimmo Kinnunen
Would this be acceptable, if I fix the compile problems for win + mac, hope ...
6 years, 2 months ago (2014-10-06 11:59:24 UTC) #2
bsalomon
I like it. I'm especially excited about running the Skia test apps against the command ...
6 years, 2 months ago (2014-10-06 12:56:37 UTC) #3
Kimmo Kinnunen
On 2014/10/06 12:56:37, bsalomon wrote: > We don't usually Sk-prefix names of classes defined in ...
6 years, 2 months ago (2014-10-07 14:01:30 UTC) #4
bsalomon
lgtm
6 years, 2 months ago (2014-10-08 10:55:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/630843002/60001
6 years, 2 months ago (2014-10-08 11:06:51 UTC) #7
commit-bot: I haz the power
Committed patchset #4 (id:60001) as a90ed4e83897b45d6331ee4c54e1edd4054de9a8
6 years, 2 months ago (2014-10-08 11:14:29 UTC) #8
bsalomon
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/639793002/ by bsalomon@google.com. ...
6 years, 2 months ago (2014-10-08 11:43:54 UTC) #9
Kimmo Kinnunen
On 2014/10/08 11:43:54, bsalomon wrote: > The reason for reverting is: nanobech failing on Android. ...
6 years, 2 months ago (2014-10-08 12:32:47 UTC) #10
bsalomon
On 2014/10/08 12:32:47, Kimmo Kinnunen wrote: > On 2014/10/08 11:43:54, bsalomon wrote: > > The ...
6 years, 2 months ago (2014-10-08 12:38:10 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/630843002/80001
6 years, 2 months ago (2014-10-09 12:16:20 UTC) #13
commit-bot: I haz the power
6 years, 2 months ago (2014-10-09 12:24:20 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as 9e61bb7815b133bc40ea7b00fccc853f4b728e3c

Powered by Google App Engine
This is Rietveld 408576698