aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp4
-rw-r--r--src/gpu/gl/GrGLCaps.h3
-rw-r--r--src/gpu/gl/GrGLContext.cpp7
-rw-r--r--src/gpu/gl/GrGLContext.h5
-rw-r--r--src/gpu/gl/GrGLGpu.cpp7
-rw-r--r--src/gpu/gl/GrGLGpu.h3
-rw-r--r--src/gpu/gl/GrGLProgramDataManager.cpp2
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp2
8 files changed, 12 insertions, 21 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 6f272b7b8e..2a97137f12 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -12,9 +12,7 @@
#include "SkTSearch.h"
#include "SkTSort.h"
-GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
- const GrGLContextInfo& ctxInfo,
- const GrGLInterface* glInterface) : INHERITED(contextOptions) {
+GrGLCaps::GrGLCaps(const GrGLContextInfo& ctxInfo, const GrGLInterface* glInterface) {
fVerifiedColorConfigs.reset();
fStencilFormats.reset();
fStencilVerifiedColorConfigs.reset();
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 9d38c82ced..cd84242292 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -91,8 +91,7 @@ public:
* Initializes the GrGLCaps to the set of features supported in the current
* OpenGL context accessible via ctxInfo.
*/
- GrGLCaps(const GrContextOptions& contextOptions, const GrGLContextInfo& ctxInfo,
- const GrGLInterface* glInterface);
+ GrGLCaps(const GrGLContextInfo& ctxInfo, const GrGLInterface* glInterface);
/**
* Call to note that a color config has been verified as a valid color
diff --git a/src/gpu/gl/GrGLContext.cpp b/src/gpu/gl/GrGLContext.cpp
index 335986508d..8115687093 100644
--- a/src/gpu/gl/GrGLContext.cpp
+++ b/src/gpu/gl/GrGLContext.cpp
@@ -9,7 +9,7 @@
////////////////////////////////////////////////////////////////////////////////
-GrGLContext* GrGLContext::Create(const GrGLInterface* interface, const GrContextOptions& options) {
+GrGLContext* GrGLContext::Create(const GrGLInterface* interface) {
// We haven't validated the GrGLInterface yet, so check for GetString function pointer
if (!interface->fFunctions.fGetString) {
return NULL;
@@ -55,9 +55,6 @@ GrGLContext* GrGLContext::Create(const GrGLInterface* interface, const GrContext
args.fIsMesa = GrGLIsMesaFromVersionString(ver);
args.fIsChromium = GrGLIsChromiumFromRendererString(renderer);
-
- args.fContextOptions = &options;
-
return SkNEW_ARGS(GrGLContext, (args));
}
@@ -70,5 +67,5 @@ GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) {
fIsMesa = args.fIsMesa;
fIsChromium = args.fIsChromium;
- fGLCaps.reset(SkNEW_ARGS(GrGLCaps, (*args.fContextOptions, *this, fInterface)));
+ fGLCaps.reset(SkNEW_ARGS(GrGLCaps, (*this, fInterface)));
}
diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h
index 50262cf44a..e84c8ecffc 100644
--- a/src/gpu/gl/GrGLContext.h
+++ b/src/gpu/gl/GrGLContext.h
@@ -15,7 +15,7 @@
#include "GrGLSL.h"
#include "GrGLUtil.h"
-struct GrContextOptions;
+#include "SkString.h"
/**
* Encapsulates information about an OpenGL context including the OpenGL
@@ -51,7 +51,6 @@ protected:
GrGLRenderer fRenderer;
bool fIsMesa;
bool fIsChromium;
- const GrContextOptions* fContextOptions;
};
GrGLContextInfo(const ConstructorArgs& args);
@@ -75,7 +74,7 @@ public:
* Creates a GrGLContext from a GrGLInterface and the currently
* bound OpenGL context accessible by the GrGLInterface.
*/
- static GrGLContext* Create(const GrGLInterface* interface, const GrContextOptions& options);
+ static GrGLContext* Create(const GrGLInterface* interface);
const GrGLInterface* interface() const { return fInterface; }
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 3a3b833a8f..07aaaae26b 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -157,8 +157,7 @@ bool GrGLGpu::BlendCoeffReferencesConstant(GrBlendCoeff coeff) {
///////////////////////////////////////////////////////////////////////////////
-GrGpu* GrGLGpu::Create(GrBackendContext backendContext, const GrContextOptions& options,
- GrContext* context) {
+GrGpu* GrGLGpu::Create(GrBackendContext backendContext, GrContext* context) {
SkAutoTUnref<const GrGLInterface> glInterface(
reinterpret_cast<const GrGLInterface*>(backendContext));
if (!glInterface) {
@@ -169,7 +168,7 @@ GrGpu* GrGLGpu::Create(GrBackendContext backendContext, const GrContextOptions&
if (!glInterface) {
return NULL;
}
- GrGLContext* glContext = GrGLContext::Create(glInterface, options);
+ GrGLContext* glContext = GrGLContext::Create(glInterface);
if (glContext) {
return SkNEW_ARGS(GrGLGpu, (glContext, context));
}
@@ -1437,7 +1436,7 @@ bool GrGLGpu::flushGLState(const DrawArgs& args) {
fCurrentProgram.reset(fProgramCache->getProgram(args));
if (NULL == fCurrentProgram.get()) {
- GrCapsDebugf(this->caps(), "Failed to create program!\n");
+ GrContextDebugf(this->getContext(), "Failed to create program!\n");
return false;
}
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index c777f7792a..d7b11026f5 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -32,8 +32,7 @@ class GrNonInstancedVertices;
class GrGLGpu : public GrGpu {
public:
- static GrGpu* Create(GrBackendContext backendContext, const GrContextOptions& options,
- GrContext* context);
+ static GrGpu* Create(GrBackendContext backendContext, GrContext* context);
~GrGLGpu() override;
void contextAbandoned() override;
diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp
index ce2598e246..ef2f59e664 100644
--- a/src/gpu/gl/GrGLProgramDataManager.cpp
+++ b/src/gpu/gl/GrGLProgramDataManager.cpp
@@ -261,7 +261,7 @@ void GrGLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix
#ifdef SK_DEBUG
void GrGLProgramDataManager::printUnused(const Uniform& uni) const {
if (kUnusedUniform == uni.fFSLocation && kUnusedUniform == uni.fVSLocation) {
- GrCapsDebugf(fGpu->caps(), "Unused uniform in shader\n");
+ GrContextDebugf(fGpu->getContext(), "Unused uniform in shader\n");
}
}
#endif
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index a3b0d686a4..28e1fba20c 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -207,7 +207,7 @@ bool GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr
totalTextures += processor->numTextures();
if (totalTextures >= maxTextureUnits) {
- GrCapsDebugf(fGpu->caps(), "Program would use too many texture units\n");
+ GrContextDebugf(fGpu->getContext(), "Program would use too many texture units\n");
return false;
}
}