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

Unified Diff: include/gpu/gl/command_buffer/SkCommandBufferGLContext.h

Issue 1684413003: Implement support for using GL ES 3.0 with command buffer (Closed) Base URL: https://skia.googlesource.com/skia.git@no-texture-rectangle-gles
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
diff --git a/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h b/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
index 47f3fd967a3b665217864a8d24690452e20751bd..be08e0b5e701cc493926153bbe6b83d840f08bf9 100644
--- a/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
+++ b/include/gpu/gl/command_buffer/SkCommandBufferGLContext.h
@@ -17,7 +17,15 @@ public:
~SkCommandBufferGLContext() override;
static SkCommandBufferGLContext* Create() {
- SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext;
+ SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext(kGLES2);
+ if (!ctx->isValid()) {
+ delete ctx;
+ return nullptr;
+ }
+ return ctx;
+ }
+ static SkCommandBufferGLContext* CreateES3() {
+ SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext(kGLES3);
if (!ctx->isValid()) {
delete ctx;
return nullptr;
@@ -42,10 +50,14 @@ public:
int getSampleCount();
private:
- SkCommandBufferGLContext();
+ enum ContextVersion {
bsalomon 2016/02/12 14:03:27 Can you either add suffixes (_ContextVersion) or m
Kimmo Kinnunen 2016/02/15 08:10:14 Done.
+ kGLES2,
+ kGLES3
+ };
+ SkCommandBufferGLContext(ContextVersion minContextVersion);
SkCommandBufferGLContext(void* nativeWindow, int msaaSampleCount);
- void initializeGLContext(void* nativeWindow, const int* configAttribs,
- const int* surfaceAttribs);
+ void initializeGLContext(ContextVersion minContextVersion, void* nativeWindow,
+ const int* configAttribs, const int* surfaceAttribs);
void destroyGLContext();
void onPlatformMakeCurrent() const override;
« no previous file with comments | « dm/DM.cpp ('k') | src/gpu/GrContextFactory.h » ('j') | src/gpu/GrContextFactory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698