aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrGpuFactory.cpp2
-rw-r--r--src/gpu/GrProgramDesc.h2
-rw-r--r--src/gpu/GrTraceMarker.cpp2
-rw-r--r--src/gpu/gl/GrGLBufferImpl.cpp12
-rw-r--r--src/gpu/gl/GrGLBufferImpl.h14
-rw-r--r--src/gpu/gl/GrGLIndexBuffer.cpp2
-rw-r--r--src/gpu/gl/GrGLIndexBuffer.h8
-rw-r--r--src/gpu/gl/GrGLPath.cpp6
-rw-r--r--src/gpu/gl/GrGLPath.h6
-rw-r--r--src/gpu/gl/GrGLPathRange.cpp8
-rw-r--r--src/gpu/gl/GrGLPathRange.h6
-rw-r--r--src/gpu/gl/GrGLPathRendering.cpp2
-rw-r--r--src/gpu/gl/GrGLPathRendering.h10
-rw-r--r--src/gpu/gl/GrGLProgram.cpp8
-rw-r--r--src/gpu/gl/GrGLProgram.h12
-rw-r--r--src/gpu/gl/GrGLProgramDataManager.cpp2
-rw-r--r--src/gpu/gl/GrGLProgramDataManager.h6
-rw-r--r--src/gpu/gl/GrGLProgramDesc.cpp2
-rw-r--r--src/gpu/gl/GrGLProgramDesc.h6
-rw-r--r--src/gpu/gl/GrGLRenderTarget.cpp6
-rw-r--r--src/gpu/gl/GrGLRenderTarget.h6
-rw-r--r--src/gpu/gl/GrGLStencilBuffer.cpp2
-rw-r--r--src/gpu/gl/GrGLTexture.cpp6
-rw-r--r--src/gpu/gl/GrGLTexture.h4
-rw-r--r--src/gpu/gl/GrGLTextureRenderTarget.h4
-rw-r--r--src/gpu/gl/GrGLVertexArray.cpp8
-rw-r--r--src/gpu/gl/GrGLVertexArray.h8
-rw-r--r--src/gpu/gl/GrGLVertexBuffer.cpp2
-rw-r--r--src/gpu/gl/GrGLVertexBuffer.h8
-rw-r--r--src/gpu/gl/GrGpuGL.cpp112
-rw-r--r--src/gpu/gl/GrGpuGL.h18
-rw-r--r--src/gpu/gl/GrGpuGL_program.cpp14
-rw-r--r--src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp8
-rw-r--r--src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.cpp2
-rw-r--r--src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h2
-rw-r--r--src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp2
-rw-r--r--src/gpu/gl/builders/GrGLNvprProgramBuilder.h2
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp6
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.h12
-rw-r--r--src/gpu/gl/builders/GrGLShaderBuilder.cpp2
-rw-r--r--src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp2
41 files changed, 176 insertions, 176 deletions
diff --git a/src/gpu/GrGpuFactory.cpp b/src/gpu/GrGpuFactory.cpp
index 6397bb2d5c..e8d9454762 100644
--- a/src/gpu/GrGpuFactory.cpp
+++ b/src/gpu/GrGpuFactory.cpp
@@ -36,7 +36,7 @@ GrGpu* GrGpu::Create(GrBackend backend, GrBackendContext backendContext, GrConte
}
GrGLContext ctx(glInterface);
if (ctx.isInitialized()) {
- return SkNEW_ARGS(GrGpuGL, (ctx, context));
+ return SkNEW_ARGS(GrGLGpu, (ctx, context));
}
}
return NULL;
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 8e255275b6..9ba20aa94a 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -12,7 +12,7 @@
#include "GrTypesPriv.h"
#include "SkChecksum.h"
-class GrGpuGL;
+class GrGLGpu;
/** This class describes a program to generate. It also serves as a program cache key. Very little
of this is GL-specific. The GL-specific parts could be factored out into a subclass. */
diff --git a/src/gpu/GrTraceMarker.cpp b/src/gpu/GrTraceMarker.cpp
index bc6d456618..f54ab83b80 100644
--- a/src/gpu/GrTraceMarker.cpp
+++ b/src/gpu/GrTraceMarker.cpp
@@ -62,7 +62,7 @@ SkString GrTraceMarkerSet::toString() const {
int counter = 0;
const int numMarkers = this->fMarkerArray.count();
- // check used for GrGpuGL device after we've already collapsed all markers
+ // check used for GrGLGpu device after we've already collapsed all markers
if (1 == numMarkers && -1 == this->fMarkerArray[0].fID) {
marker_string.append(this->fMarkerArray[0].fMarker);
return marker_string;
diff --git a/src/gpu/gl/GrGLBufferImpl.cpp b/src/gpu/gl/GrGLBufferImpl.cpp
index 8b5eda58ef..3aa81e5763 100644
--- a/src/gpu/gl/GrGLBufferImpl.cpp
+++ b/src/gpu/gl/GrGLBufferImpl.cpp
@@ -20,7 +20,7 @@
// objects are implemented as client-side-arrays on tile-deferred architectures.
#define DYNAMIC_USAGE_PARAM GR_GL_STREAM_DRAW
-GrGLBufferImpl::GrGLBufferImpl(GrGpuGL* gpu, const Desc& desc, GrGLenum bufferType)
+GrGLBufferImpl::GrGLBufferImpl(GrGLGpu* gpu, const Desc& desc, GrGLenum bufferType)
: fDesc(desc)
, fBufferType(bufferType)
, fMapPtr(NULL) {
@@ -35,7 +35,7 @@ GrGLBufferImpl::GrGLBufferImpl(GrGpuGL* gpu, const Desc& desc, GrGLenum bufferTy
VALIDATE();
}
-void GrGLBufferImpl::release(GrGpuGL* gpu) {
+void GrGLBufferImpl::release(GrGLGpu* gpu) {
VALIDATE();
// make sure we've not been abandoned or already released
if (fCPUData) {
@@ -65,7 +65,7 @@ void GrGLBufferImpl::abandon() {
VALIDATE();
}
-void GrGLBufferImpl::bind(GrGpuGL* gpu) const {
+void GrGLBufferImpl::bind(GrGLGpu* gpu) const {
VALIDATE();
if (GR_GL_ARRAY_BUFFER == fBufferType) {
gpu->bindVertexBuffer(fDesc.fID);
@@ -76,7 +76,7 @@ void GrGLBufferImpl::bind(GrGpuGL* gpu) const {
VALIDATE();
}
-void* GrGLBufferImpl::map(GrGpuGL* gpu) {
+void* GrGLBufferImpl::map(GrGLGpu* gpu) {
VALIDATE();
SkASSERT(!this->isMapped());
if (0 == fDesc.fID) {
@@ -133,7 +133,7 @@ void* GrGLBufferImpl::map(GrGpuGL* gpu) {
return fMapPtr;
}
-void GrGLBufferImpl::unmap(GrGpuGL* gpu) {
+void GrGLBufferImpl::unmap(GrGLGpu* gpu) {
VALIDATE();
SkASSERT(this->isMapped());
if (0 != fDesc.fID) {
@@ -160,7 +160,7 @@ bool GrGLBufferImpl::isMapped() const {
return SkToBool(fMapPtr);
}
-bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes) {
+bool GrGLBufferImpl::updateData(GrGLGpu* gpu, const void* src, size_t srcSizeInBytes) {
SkASSERT(!this->isMapped());
VALIDATE();
if (srcSizeInBytes > fDesc.fSizeInBytes) {
diff --git a/src/gpu/gl/GrGLBufferImpl.h b/src/gpu/gl/GrGLBufferImpl.h
index 279075f4c9..8617a897d4 100644
--- a/src/gpu/gl/GrGLBufferImpl.h
+++ b/src/gpu/gl/GrGLBufferImpl.h
@@ -11,7 +11,7 @@
#include "SkTypes.h"
#include "gl/GrGLFunctions.h"
-class GrGpuGL;
+class GrGLGpu;
/**
* This class serves as the implementation of GrGL*Buffer classes. It was written to avoid code
@@ -26,24 +26,24 @@ public:
bool fDynamic;
};
- GrGLBufferImpl(GrGpuGL*, const Desc&, GrGLenum bufferType);
+ GrGLBufferImpl(GrGLGpu*, const Desc&, GrGLenum bufferType);
~GrGLBufferImpl() {
// either release or abandon should have been called by the owner of this object.
SkASSERT(0 == fDesc.fID);
}
void abandon();
- void release(GrGpuGL* gpu);
+ void release(GrGLGpu* gpu);
GrGLuint bufferID() const { return fDesc.fID; }
size_t baseOffset() const { return reinterpret_cast<size_t>(fCPUData); }
- void bind(GrGpuGL* gpu) const;
+ void bind(GrGLGpu* gpu) const;
- void* map(GrGpuGL* gpu);
- void unmap(GrGpuGL* gpu);
+ void* map(GrGLGpu* gpu);
+ void unmap(GrGLGpu* gpu);
bool isMapped() const;
- bool updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes);
+ bool updateData(GrGLGpu* gpu, const void* src, size_t srcSizeInBytes);
private:
void validate() const;
diff --git a/src/gpu/gl/GrGLIndexBuffer.cpp b/src/gpu/gl/GrGLIndexBuffer.cpp
index 5991c09613..1fea4eae43 100644
--- a/src/gpu/gl/GrGLIndexBuffer.cpp
+++ b/src/gpu/gl/GrGLIndexBuffer.cpp
@@ -8,7 +8,7 @@
#include "GrGLIndexBuffer.h"
#include "GrGpuGL.h"
-GrGLIndexBuffer::GrGLIndexBuffer(GrGpuGL* gpu, const Desc& desc)
+GrGLIndexBuffer::GrGLIndexBuffer(GrGLGpu* gpu, const Desc& desc)
: INHERITED(gpu, desc.fIsWrapped, desc.fSizeInBytes, desc.fDynamic, 0 == desc.fID)
, fImpl(gpu, desc, GR_GL_ELEMENT_ARRAY_BUFFER) {
this->registerWithCache();
diff --git a/src/gpu/gl/GrGLIndexBuffer.h b/src/gpu/gl/GrGLIndexBuffer.h
index a62bba1d51..0eb10bb662 100644
--- a/src/gpu/gl/GrGLIndexBuffer.h
+++ b/src/gpu/gl/GrGLIndexBuffer.h
@@ -12,14 +12,14 @@
#include "GrGLBufferImpl.h"
#include "gl/GrGLInterface.h"
-class GrGpuGL;
+class GrGLGpu;
class GrGLIndexBuffer : public GrIndexBuffer {
public:
typedef GrGLBufferImpl::Desc Desc;
- GrGLIndexBuffer(GrGpuGL* gpu, const Desc& desc);
+ GrGLIndexBuffer(GrGLGpu* gpu, const Desc& desc);
GrGLuint bufferID() const { return fImpl.bufferID(); }
size_t baseOffset() const { return fImpl.baseOffset(); }
@@ -39,9 +39,9 @@ private:
virtual void onUnmap() SK_OVERRIDE;
virtual bool onUpdateData(const void* src, size_t srcSizeInBytes) SK_OVERRIDE;
- GrGpuGL* getGpuGL() const {
+ GrGLGpu* getGpuGL() const {
SkASSERT(!this->wasDestroyed());
- return (GrGpuGL*)(this->getGpu());
+ return (GrGLGpu*)(this->getGpu());
}
GrGLBufferImpl fImpl;
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp
index abbd12798d..80139d7fe9 100644
--- a/src/gpu/gl/GrGLPath.cpp
+++ b/src/gpu/gl/GrGLPath.cpp
@@ -90,7 +90,7 @@ inline void points_to_coords(const SkPoint points[], size_t first_point, size_t
static const bool kIsWrapped = false; // The constructor creates the GL path object.
-void GrGLPath::InitPathObject(GrGpuGL* gpu,
+void GrGLPath::InitPathObject(GrGLGpu* gpu,
GrGLuint pathID,
const SkPath& skPath,
const SkStrokeRec& stroke) {
@@ -183,7 +183,7 @@ void GrGLPath::InitPathObject(GrGpuGL* gpu,
}
}
-GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke)
+GrGLPath::GrGLPath(GrGLGpu* gpu, const SkPath& path, const SkStrokeRec& stroke)
: INHERITED(gpu, kIsWrapped, path, stroke),
fPathID(gpu->glPathRendering()->genPaths(1)) {
@@ -198,7 +198,7 @@ GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke)
void GrGLPath::onRelease() {
if (0 != fPathID && !this->isWrapped()) {
- static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fPathID, 1);
+ static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fPathID, 1);
fPathID = 0;
}
diff --git a/src/gpu/gl/GrGLPath.h b/src/gpu/gl/GrGLPath.h
index a7640d526a..57a26401ac 100644
--- a/src/gpu/gl/GrGLPath.h
+++ b/src/gpu/gl/GrGLPath.h
@@ -12,7 +12,7 @@
#include "../GrPath.h"
#include "gl/GrGLFunctions.h"
-class GrGpuGL;
+class GrGLGpu;
/**
* Currently this represents a path built using GL_NV_path_rendering. If we
@@ -22,12 +22,12 @@ class GrGpuGL;
class GrGLPath : public GrPath {
public:
- static void InitPathObject(GrGpuGL*,
+ static void InitPathObject(GrGLGpu*,
GrGLuint pathID,
const SkPath&,
const SkStrokeRec&);
- GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke);
+ GrGLPath(GrGLGpu* gpu, const SkPath& path, const SkStrokeRec& stroke);
GrGLuint pathID() const { return fPathID; }
protected:
diff --git a/src/gpu/gl/GrGLPathRange.cpp b/src/gpu/gl/GrGLPathRange.cpp
index 5ff64f85af..a85c32000e 100644
--- a/src/gpu/gl/GrGLPathRange.cpp
+++ b/src/gpu/gl/GrGLPathRange.cpp
@@ -11,14 +11,14 @@
#include "GrGLPathRendering.h"
#include "GrGpuGL.h"
-GrGLPathRange::GrGLPathRange(GrGpuGL* gpu, PathGenerator* pathGenerator, const SkStrokeRec& stroke)
+GrGLPathRange::GrGLPathRange(GrGLGpu* gpu, PathGenerator* pathGenerator, const SkStrokeRec& stroke)
: INHERITED(gpu, pathGenerator, stroke),
fBasePathID(gpu->glPathRendering()->genPaths(this->getNumPaths())),
fGpuMemorySize(0) {
this->registerWithCache();
}
-GrGLPathRange::GrGLPathRange(GrGpuGL* gpu,
+GrGLPathRange::GrGLPathRange(GrGLGpu* gpu,
GrGLuint basePathID,
int numPaths,
size_t gpuMemorySize,
@@ -30,7 +30,7 @@ GrGLPathRange::GrGLPathRange(GrGpuGL* gpu,
}
void GrGLPathRange::onInitPath(int index, const SkPath& skPath) const {
- GrGpuGL* gpu = static_cast<GrGpuGL*>(this->getGpu());
+ GrGLGpu* gpu = static_cast<GrGLGpu*>(this->getGpu());
if (NULL == gpu) {
return;
}
@@ -51,7 +51,7 @@ void GrGLPathRange::onRelease() {
SkASSERT(this->getGpu());
if (0 != fBasePathID && !this->isWrapped()) {
- static_cast<GrGpuGL*>(this->getGpu())->glPathRendering()->deletePaths(fBasePathID,
+ static_cast<GrGLGpu*>(this->getGpu())->glPathRendering()->deletePaths(fBasePathID,
this->getNumPaths());
fBasePathID = 0;
}
diff --git a/src/gpu/gl/GrGLPathRange.h b/src/gpu/gl/GrGLPathRange.h
index 5fbfb1f917..17d44c2ae5 100644
--- a/src/gpu/gl/GrGLPathRange.h
+++ b/src/gpu/gl/GrGLPathRange.h
@@ -12,7 +12,7 @@
#include "../GrPathRange.h"
#include "gl/GrGLFunctions.h"
-class GrGpuGL;
+class GrGLGpu;
/**
* Currently this represents a range of GL_NV_path_rendering Path IDs. If we
@@ -26,14 +26,14 @@ public:
* Initialize a GL path range from a PathGenerator. This class will allocate
* the GPU path objects and initialize them lazily.
*/
- GrGLPathRange(GrGpuGL*, PathGenerator*, const SkStrokeRec&);
+ GrGLPathRange(GrGLGpu*, PathGenerator*, const SkStrokeRec&);
/**
* Initialize a GL path range from an existing range of pre-initialized GPU
* path objects. This class assumes ownership of the GPU path objects and
* will delete them when done.
*/
- GrGLPathRange(GrGpuGL*,
+ GrGLPathRange(GrGLGpu*,
GrGLuint basePathID,
int numPaths,
size_t gpuMemorySize,
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 44b86818e9..a20c4de08b 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -59,7 +59,7 @@ static GrGLenum gr_stencil_op_to_gl_path_rendering_fill_mode(GrStencilOp op) {
}
}
-GrGLPathRendering::GrGLPathRendering(GrGpuGL* gpu)
+GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu)
: fGpu(gpu) {
const GrGLInterface* glInterface = gpu->glInterface();
fCaps.stencilThenCoverSupport =
diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h
index 1f1a33cbbb..ee4011d3ac 100644
--- a/src/gpu/gl/GrGLPathRendering.h
+++ b/src/gpu/gl/GrGLPathRendering.h
@@ -15,11 +15,11 @@
#include "gl/GrGLProgram.h"
class GrGLNameAllocator;
-class GrGpuGL;
+class GrGLGpu;
/**
* This class wraps the NV_path_rendering extension and manages its various
- * API versions. If a method is not present in the GrGLInterface of the GrGpuGL
+ * API versions. If a method is not present in the GrGLInterface of the GrGLGpu
* (because the driver version is old), it tries to provide a backup
* implementation. But if a backup implementation is not practical, it marks the
* method as not supported.
@@ -27,9 +27,9 @@ class GrGpuGL;
class GrGLPathRendering : public GrPathRendering {
public:
/**
- * Create a new GrGLPathRendering object from a given GrGpuGL.
+ * Create a new GrGLPathRendering object from a given GrGLGpu.
*/
- GrGLPathRendering(GrGpuGL* gpu);
+ GrGLPathRendering(GrGLGpu* gpu);
virtual ~GrGLPathRendering();
// GrPathRendering implementations.
@@ -126,7 +126,7 @@ private:
GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum coverMode,
GrGLenum transformType, const GrGLfloat *transformValues);
- GrGpuGL* fGpu;
+ GrGLGpu* fGpu;
SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
Caps fCaps;
GrGLProgram::MatrixState fHWProjectionMatrixState;
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 7d5b0d7532..0f4b70de2b 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -53,7 +53,7 @@ static SkMatrix get_transform_matrix(const GrPendingFragmentStage& stage, int tr
///////////////////////////////////////////////////////////////////////////////////////////////////
-GrGLProgram::GrGLProgram(GrGpuGL* gpu,
+GrGLProgram::GrGLProgram(GrGLGpu* gpu,
const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
@@ -239,7 +239,7 @@ void GrGLProgram::onSetMatrixAndRenderTargetHeight(const GrOptDrawState& optStat
/////////////////////////////////////////////////////////////////////////////////////////
-GrGLNvprProgramBase::GrGLNvprProgramBase(GrGpuGL* gpu,
+GrGLNvprProgramBase::GrGLNvprProgramBase(GrGLGpu* gpu,
const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
@@ -261,7 +261,7 @@ void GrGLNvprProgramBase::onSetMatrixAndRenderTargetHeight(const GrOptDrawState&
/////////////////////////////////////////////////////////////////////////////////////////
-GrGLNvprProgram::GrGLNvprProgram(GrGpuGL* gpu,
+GrGLNvprProgram::GrGLNvprProgram(GrGLGpu* gpu,
const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
@@ -314,7 +314,7 @@ void GrGLNvprProgram::setTransformData(const GrPendingFragmentStage& proc,
//////////////////////////////////////////////////////////////////////////////////////
-GrGLLegacyNvprProgram::GrGLLegacyNvprProgram(GrGpuGL* gpu,
+GrGLLegacyNvprProgram::GrGLLegacyNvprProgram(GrGLGpu* gpu,
const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index bada8fdb30..09dd4aa043 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -126,7 +126,7 @@ public:
/**
* This function uploads uniforms and calls each GrGLProcessor's setData. It is called before a
* draw occurs using the program after the program has already been bound. It also uses the
- * GrGpuGL object to bind the textures required by the GrGLProcessors. The color and coverage
+ * GrGLGpu object to bind the textures required by the GrGLProcessors. The color and coverage
* stages come from GrGLProgramDesc::Build().
*/
void setData(const GrOptDrawState&);
@@ -135,7 +135,7 @@ protected:
typedef GrGLProgramDataManager::UniformHandle UniformHandle;
typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray;
- GrGLProgram(GrGpuGL*,
+ GrGLProgram(GrGLGpu*,
const GrProgramDesc&,
const BuiltinUniformHandles&,
GrGLuint programID,
@@ -177,7 +177,7 @@ protected:
SkAutoTUnref<GrGLInstalledFragProcs> fFragmentProcessors;
GrProgramDesc fDesc;
- GrGpuGL* fGpu;
+ GrGLGpu* fGpu;
GrGLProgramDataManager fProgramDataManager;
friend class GrGLProgramBuilder;
@@ -194,7 +194,7 @@ protected:
*/
class GrGLNvprProgramBase : public GrGLProgram {
protected:
- GrGLNvprProgramBase(GrGpuGL*,
+ GrGLNvprProgramBase(GrGLGpu*,
const GrProgramDesc&,
const BuiltinUniformHandles&,
GrGLuint programID,
@@ -214,7 +214,7 @@ public:
private:
typedef GrGLNvprProgramBuilder::SeparableVaryingInfo SeparableVaryingInfo;
typedef GrGLNvprProgramBuilder::SeparableVaryingInfoArray SeparableVaryingInfoArray;
- GrGLNvprProgram(GrGpuGL*,
+ GrGLNvprProgram(GrGLGpu*,
const GrProgramDesc&,
const BuiltinUniformHandles&,
GrGLuint programID,
@@ -245,7 +245,7 @@ public:
virtual bool hasVertexShader() const SK_OVERRIDE { return false; }
private:
- GrGLLegacyNvprProgram(GrGpuGL* gpu,
+ GrGLLegacyNvprProgram(GrGLGpu* gpu,
const GrProgramDesc& desc,
const BuiltinUniformHandles&,
GrGLuint programID,
diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp
index f8d996b542..65bf735cf0 100644
--- a/src/gpu/gl/GrGLProgramDataManager.cpp
+++ b/src/gpu/gl/GrGLProgramDataManager.cpp
@@ -14,7 +14,7 @@
SkASSERT(arrayCount <= uni.fArrayCount || \
(1 == arrayCount && GrGLShaderVar::kNonArray == uni.fArrayCount))
-GrGLProgramDataManager::GrGLProgramDataManager(GrGpuGL* gpu, const UniformInfoArray& uniforms)
+GrGLProgramDataManager::GrGLProgramDataManager(GrGLGpu* gpu, const UniformInfoArray& uniforms)
: fGpu(gpu) {
int count = uniforms.count();
fUniforms.push_back_n(count);
diff --git a/src/gpu/gl/GrGLProgramDataManager.h b/src/gpu/gl/GrGLProgramDataManager.h
index bbf7d42e89..31f7f2e15b 100644
--- a/src/gpu/gl/GrGLProgramDataManager.h
+++ b/src/gpu/gl/GrGLProgramDataManager.h
@@ -14,7 +14,7 @@
#include "SkTArray.h"
-class GrGpuGL;
+class GrGLGpu;
class SkMatrix;
class GrGLProgram;
class GrGLProgramBuilder;
@@ -67,7 +67,7 @@ public:
// name strings. Otherwise, we'd have to hand out copies.
typedef GrTAllocator<UniformInfo> UniformInfoArray;
- GrGLProgramDataManager(GrGpuGL*, const UniformInfoArray&);
+ GrGLProgramDataManager(GrGLGpu*, const UniformInfoArray&);
/** Functions for uploading uniform values. The varities ending in v can be used to upload to an
* array of uniforms. arrayCount must be <= the array count of the uniform.
@@ -106,7 +106,7 @@ private:
};
SkTArray<Uniform, true> fUniforms;
- GrGpuGL* fGpu;
+ GrGLGpu* fGpu;
typedef SkRefCnt INHERITED;
};
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index c5c31d33ae..06377c758e 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -142,7 +142,7 @@ static bool get_meta_key(const GrProcessor& proc,
bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState,
const GrProgramDesc::DescInfo& descInfo,
GrGpu::DrawType drawType,
- GrGpuGL* gpu,
+ GrGLGpu* gpu,
GrProgramDesc* desc) {
// The descriptor is used as a cache key. Thus when a field of the
// descriptor will not affect program generation (because of the attribute
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h
index b53daeb444..401ce222fb 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -13,7 +13,7 @@
#include "GrGpu.h"
#include "GrTypesPriv.h"
-class GrGpuGL;
+class GrGLGpu;
/**
* This class can be used to build a GrProgramDesc. It also provides helpers for accessing
@@ -52,7 +52,7 @@ public:
* @param DescInfo A descriptor info struct, generated by the optstate, which contains a number
* of important facts about the program the built descriptor will represent
* @param DrawType
- * @param GrGpuGL A GL Gpu, the caps and Gpu object are used to output processor specific
+ * @param GrGLGpu A GL Gpu, the caps and Gpu object are used to output processor specific
* parts of the descriptor.
* @param GrDeviceCoordTexture A dstCopy texture, which may be null if frame buffer fetch is
* supported
@@ -61,7 +61,7 @@ public:
static bool Build(const GrOptDrawState&,
const GrProgramDesc::DescInfo&,
GrGpu::DrawType,
- GrGpuGL*,
+ GrGLGpu*,
GrProgramDesc*);
static const GLKeyHeader& GetHeader(const GrProgramDesc& desc) {
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index 4af7be2c1b..425764d8eb 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -9,18 +9,18 @@
#include "GrGpuGL.h"
-#define GPUGL static_cast<GrGpuGL*>(this->getGpu())
+#define GPUGL static_cast<GrGLGpu*>(this->getGpu())
#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
// Because this class is virtually derived from GrSurface we must explicitly call its constructor.
-GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc)
+GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc)
: GrSurface(gpu, idDesc.fIsWrapped, desc)
, INHERITED(gpu, idDesc.fIsWrapped, desc) {
this->init(desc, idDesc);
this->registerWithCache();
}
-GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc,
+GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc,
Derived)
: GrSurface(gpu, idDesc.fIsWrapped, desc)
, INHERITED(gpu, idDesc.fIsWrapped, desc) {
diff --git a/src/gpu/gl/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h
index 079e9d5c53..adc967f7be 100644
--- a/src/gpu/gl/GrGLRenderTarget.h
+++ b/src/gpu/gl/GrGLRenderTarget.h
@@ -13,7 +13,7 @@
#include "GrRenderTarget.h"
#include "SkScalar.h"
-class GrGpuGL;
+class GrGLGpu;
class GrGLRenderTarget : public GrRenderTarget {
public:
@@ -28,7 +28,7 @@ public:
bool fIsWrapped;
};
- GrGLRenderTarget(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&);
+ GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
void setViewport(const GrGLIRect& rect) { fViewport = rect; }
const GrGLIRect& getViewport() const { return fViewport; }
@@ -61,7 +61,7 @@ protected:
// class should register with the cache. This constructor does not do the registration and
// rather moves that burden onto the derived class.
enum Derived { kDerived };
- GrGLRenderTarget(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&, Derived);
+ GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived);
void init(const GrSurfaceDesc&, const IDDesc&);
diff --git a/src/gpu/gl/GrGLStencilBuffer.cpp b/src/gpu/gl/GrGLStencilBuffer.cpp
index 2ec06d438c..1e854cf145 100644
--- a/src/gpu/gl/GrGLStencilBuffer.cpp
+++ b/src/gpu/gl/GrGLStencilBuffer.cpp
@@ -19,7 +19,7 @@ size_t GrGLStencilBuffer::onGpuMemorySize() const {
void GrGLStencilBuffer::onRelease() {
if (0 != fRenderbufferID && !this->isWrapped()) {
- GrGpuGL* gpuGL = (GrGpuGL*) this->getGpu();
+ GrGLGpu* gpuGL = (GrGLGpu*) this->getGpu();
const GrGLInterface* gl = gpuGL->glInterface();
GR_GL_CALL(gl, DeleteRenderbuffers(1, &fRenderbufferID));
fRenderbufferID = 0;
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index ce892ddbb1..d34a3c0a39 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -8,18 +8,18 @@
#include "GrGLTexture.h"
#include "GrGpuGL.h"
-#define GPUGL static_cast<GrGpuGL*>(this->getGpu())
+#define GPUGL static_cast<GrGLGpu*>(this->getGpu())
#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
// Because this class is virtually derived from GrSurface we must explicitly call its constructor.
-GrGLTexture::GrGLTexture(GrGpuGL* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc)
+GrGLTexture::GrGLTexture(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc)
: GrSurface(gpu, idDesc.fIsWrapped, desc)
, INHERITED(gpu, idDesc.fIsWrapped, desc) {
this->init(desc, idDesc);
this->registerWithCache();
}
-GrGLTexture::GrGLTexture(GrGpuGL* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc, Derived)
+GrGLTexture::GrGLTexture(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc, Derived)
: GrSurface(gpu, idDesc.fIsWrapped, desc)
, INHERITED(gpu, idDesc.fIsWrapped, desc) {
this->init(desc, idDesc);
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
index bfa0ec34ac..7c64e17b9d 100644
--- a/src/gpu/gl/GrGLTexture.h
+++ b/src/gpu/gl/GrGLTexture.h
@@ -31,7 +31,7 @@ public:
bool fIsWrapped;
};
- GrGLTexture(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&);
+ GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
virtual GrBackendObject getTextureHandle() const SK_OVERRIDE;
@@ -56,7 +56,7 @@ protected:
// class should register with the cache. This constructor does not do the registration and
// rather moves that burden onto the derived class.
enum Derived { kDerived };
- GrGLTexture(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&, Derived);
+ GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived);
void init(const GrSurfaceDesc&, const IDDesc&);
diff --git a/src/gpu/gl/GrGLTextureRenderTarget.h b/src/gpu/gl/GrGLTextureRenderTarget.h
index 11577b8dcf..69f70c492a 100644
--- a/src/gpu/gl/GrGLTextureRenderTarget.h
+++ b/src/gpu/gl/GrGLTextureRenderTarget.h
@@ -12,7 +12,7 @@
#include "GrGLTexture.h"
#include "GrGLRenderTarget.h"
-class GrGpuGL;
+class GrGLGpu;
#ifdef SK_BUILD_FOR_WIN
// Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance.
@@ -24,7 +24,7 @@ class GrGLTextureRenderTarget : public GrGLTexture, public GrGLRenderTarget {
public:
// We're virtually derived from GrSurface (via both GrGLTexture and GrGLRenderTarget) so its
// constructor must be explicitly called.
- GrGLTextureRenderTarget(GrGpuGL* gpu,
+ GrGLTextureRenderTarget(GrGLGpu* gpu,
const GrSurfaceDesc& desc,
const GrGLTexture::IDDesc& texIDDesc,
const GrGLRenderTarget::IDDesc& rtIDDesc)
diff --git a/src/gpu/gl/GrGLVertexArray.cpp b/src/gpu/gl/GrGLVertexArray.cpp
index 4acf29235d..e28a163739 100644
--- a/src/gpu/gl/GrGLVertexArray.cpp
+++ b/src/gpu/gl/GrGLVertexArray.cpp
@@ -8,10 +8,10 @@
#include "GrGLVertexArray.h"
#include "GrGpuGL.h"
-#define GPUGL static_cast<GrGpuGL*>(this->getGpu())
+#define GPUGL static_cast<GrGLGpu*>(this->getGpu())
#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X);
-void GrGLAttribArrayState::set(const GrGpuGL* gpu,
+void GrGLAttribArrayState::set(const GrGLGpu* gpu,
int index,
GrGLVertexBuffer* buffer,
GrGLint size,
@@ -49,7 +49,7 @@ void GrGLAttribArrayState::set(const GrGpuGL* gpu,
}
}
-void GrGLAttribArrayState::disableUnusedArrays(const GrGpuGL* gpu, uint64_t usedMask) {
+void GrGLAttribArrayState::disableUnusedArrays(const GrGLGpu* gpu, uint64_t usedMask) {
int count = fAttribArrayStates.count();
for (int i = 0; i < count; ++i) {
if (!(usedMask & 0x1)) {
@@ -68,7 +68,7 @@ void GrGLAttribArrayState::disableUnusedArrays(const GrGpuGL* gpu, uint64_t used
///////////////////////////////////////////////////////////////////////////////////////////////////
-GrGLVertexArray::GrGLVertexArray(GrGpuGL* gpu, GrGLint id, int attribCount)
+GrGLVertexArray::GrGLVertexArray(GrGLGpu* gpu, GrGLint id, int attribCount)
: INHERITED(gpu, false)
, fID(id)
, fAttribArrays(attribCount)
diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h
index e5032a9ea0..792fd940e7 100644
--- a/src/gpu/gl/GrGLVertexArray.h
+++ b/src/gpu/gl/GrGLVertexArray.h
@@ -17,7 +17,7 @@
class GrGLVertexBuffer;
class GrGLIndexBuffer;
-class GrGpuGL;
+class GrGLGpu;
struct GrGLAttribLayout {
GrGLint fCount;
@@ -67,7 +67,7 @@ public:
* assumed that the GrGLAttribArrayState is tracking the state of the currently bound vertex
* array object.
*/
- void set(const GrGpuGL*,
+ void set(const GrGLGpu*,
int index,
GrGLVertexBuffer*,
GrGLint size,
@@ -80,7 +80,7 @@ public:
* This function disables vertex attribs not present in the mask. It is assumed that the
* GrGLAttribArrayState is tracking the state of the currently bound vertex array object.
*/
- void disableUnusedArrays(const GrGpuGL*, uint64_t usedAttribArrayMask);
+ void disableUnusedArrays(const GrGLGpu*, uint64_t usedAttribArrayMask);
void invalidate() {
int count = fAttribArrayStates.count();
@@ -134,7 +134,7 @@ private:
*/
class GrGLVertexArray : public GrGpuResource {
public:
- GrGLVertexArray(GrGpuGL* gpu, GrGLint id, int attribCount);
+ GrGLVertexArray(GrGLGpu* gpu, GrGLint id, int attribCount);
/**
* Binds this vertex array. If the ID has been deleted or abandoned then NULL is returned.
diff --git a/src/gpu/gl/GrGLVertexBuffer.cpp b/src/gpu/gl/GrGLVertexBuffer.cpp
index d6b630191c..1f3076764b 100644
--- a/src/gpu/gl/GrGLVertexBuffer.cpp
+++ b/src/gpu/gl/GrGLVertexBuffer.cpp
@@ -8,7 +8,7 @@
#include "GrGLVertexBuffer.h"
#include "GrGpuGL.h"
-GrGLVertexBuffer::GrGLVertexBuffer(GrGpuGL* gpu, const Desc& desc)
+GrGLVertexBuffer::GrGLVertexBuffer(GrGLGpu* gpu, const Desc& desc)
: INHERITED(gpu, desc.fIsWrapped, desc.fSizeInBytes, desc.fDynamic, 0 == desc.fID)
, fImpl(gpu, desc, GR_GL_ARRAY_BUFFER) {
this->registerWithCache();
diff --git a/src/gpu/gl/GrGLVertexBuffer.h b/src/gpu/gl/GrGLVertexBuffer.h
index 40f4af9091..ea2e37dfb8 100644
--- a/src/gpu/gl/GrGLVertexBuffer.h
+++ b/src/gpu/gl/GrGLVertexBuffer.h
@@ -12,14 +12,14 @@
#include "GrGLBufferImpl.h"
#include "gl/GrGLInterface.h"
-class GrGpuGL;
+class GrGLGpu;
class GrGLVertexBuffer : public GrVertexBuffer {
public:
typedef GrGLBufferImpl::Desc Desc;
- GrGLVertexBuffer(GrGpuGL* gpu, const Desc& desc);
+ GrGLVertexBuffer(GrGLGpu* gpu, const Desc& desc);
GrGLuint bufferID() const { return fImpl.bufferID(); }
size_t baseOffset() const { return fImpl.baseOffset(); }
@@ -39,9 +39,9 @@ private:
virtual void onUnmap() SK_OVERRIDE;
virtual bool onUpdateData(const void* src, size_t srcSizeInBytes) SK_OVERRIDE;
- GrGpuGL* getGpuGL() const {
+ GrGLGpu* getGpuGL() const {
SkASSERT(!this->wasDestroyed());
- return (GrGpuGL*)(this->getGpu());
+ return (GrGLGpu*)(this->getGpu());
}
GrGLBufferImpl fImpl;
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 0efb7ebdd0..2965cd4007 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -60,7 +60,7 @@ static const GrGLenum gXfermodeCoeff2Blend[] = {
GR_GL_ONE_MINUS_SRC1_ALPHA,
};
-bool GrGpuGL::BlendCoeffReferencesConstant(GrBlendCoeff coeff) {
+bool GrGLGpu::BlendCoeffReferencesConstant(GrBlendCoeff coeff) {
static const bool gCoeffReferencesBlendConst[] = {
false,
false,
@@ -116,7 +116,7 @@ bool GrGpuGL::BlendCoeffReferencesConstant(GrBlendCoeff coeff) {
static bool gPrintStartupSpew;
-GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context)
+GrGLGpu::GrGLGpu(const GrGLContext& ctx, GrContext* context)
: GrGpu(context)
, fGLContext(ctx) {
@@ -133,7 +133,7 @@ GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context)
GL_CALL_RET(vendor, GetString(GR_GL_VENDOR));
GL_CALL_RET(renderer, GetString(GR_GL_RENDERER));
GL_CALL_RET(version, GetString(GR_GL_VERSION));
- SkDebugf("------------------------- create GrGpuGL %p --------------\n",
+ SkDebugf("------------------------- create GrGLGpu %p --------------\n",
this);
SkDebugf("------ VENDOR %s\n", vendor);
SkDebugf("------ RENDERER %s\n", renderer);
@@ -156,7 +156,7 @@ GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context)
}
}
-GrGpuGL::~GrGpuGL() {
+GrGLGpu::~GrGLGpu() {
if (0 != fHWProgramID) {
// detach the current program so there is no confusion on OpenGL's part
// that we want it to be deleted
@@ -167,7 +167,7 @@ GrGpuGL::~GrGpuGL() {
delete fProgramCache;
}
-void GrGpuGL::contextAbandoned() {
+void GrGLGpu::contextAbandoned() {
INHERITED::contextAbandoned();
fProgramCache->abandon();
fHWProgramID = 0;
@@ -177,7 +177,7 @@ void GrGpuGL::contextAbandoned() {
}
///////////////////////////////////////////////////////////////////////////////
-GrPixelConfig GrGpuGL::preferredReadPixelsConfig(GrPixelConfig readConfig,
+GrPixelConfig GrGLGpu::preferredReadPixelsConfig(GrPixelConfig readConfig,
GrPixelConfig surfaceConfig) const {
if (GR_GL_RGBA_8888_PIXEL_OPS_SLOW && kRGBA_8888_GrPixelConfig == readConfig) {
return kBGRA_8888_GrPixelConfig;
@@ -200,7 +200,7 @@ GrPixelConfig GrGpuGL::preferredReadPixelsConfig(GrPixelConfig readConfig,
}
}
-GrPixelConfig GrGpuGL::preferredWritePixelsConfig(GrPixelConfig writeConfig,
+GrPixelConfig GrGLGpu::preferredWritePixelsConfig(GrPixelConfig writeConfig,
GrPixelConfig surfaceConfig) const {
if (GR_GL_RGBA_8888_PIXEL_OPS_SLOW && kRGBA_8888_GrPixelConfig == writeConfig) {
return kBGRA_8888_GrPixelConfig;
@@ -209,7 +209,7 @@ GrPixelConfig GrGpuGL::preferredWritePixelsConfig(GrPixelConfig writeConfig,
}
}
-bool GrGpuGL::canWriteTexturePixels(const GrTexture* texture, GrPixelConfig srcConfig) const {
+bool GrGLGpu::canWriteTexturePixels(const GrTexture* texture, GrPixelConfig srcConfig) const {
if (kIndex_8_GrPixelConfig == srcConfig || kIndex_8_GrPixelConfig == texture->config()) {
return false;
}
@@ -232,11 +232,11 @@ bool GrGpuGL::canWriteTexturePixels(const GrTexture* texture, GrPixelConfig srcC
}
}
-bool GrGpuGL::fullReadPixelsIsFasterThanPartial() const {
+bool GrGLGpu::fullReadPixelsIsFasterThanPartial() const {
return SkToBool(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL);
}
-void GrGpuGL::onResetContext(uint32_t resetBits) {
+void GrGLGpu::onResetContext(uint32_t resetBits) {
// we don't use the zb at all
if (resetBits & kMisc_GrGLBackendState) {
GL_CALL(Disable(GR_GL_DEPTH_TEST));
@@ -359,7 +359,7 @@ GrSurfaceOrigin resolve_origin(GrSurfaceOrigin origin, bool renderTarget) {
}
-GrTexture* GrGpuGL::onWrapBackendTexture(const GrBackendTextureDesc& desc) {
+GrTexture* GrGLGpu::onWrapBackendTexture(const GrBackendTextureDesc& desc) {
if (!this->configToGLFormats(desc.fConfig, false, NULL, NULL, NULL)) {
return NULL;
}
@@ -413,7 +413,7 @@ GrTexture* GrGpuGL::onWrapBackendTexture(const GrBackendTextureDesc& desc) {
return texture;
}
-GrRenderTarget* GrGpuGL::onWrapBackendRenderTarget(const GrBackendRenderTargetDesc& wrapDesc) {
+GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDesc& wrapDesc) {
GrGLRenderTarget::IDDesc idDesc;
idDesc.fRTFBOID = static_cast<GrGLuint>(wrapDesc.fRenderTargetHandle);
idDesc.fMSColorRenderbufferID = 0;
@@ -451,7 +451,7 @@ GrRenderTarget* GrGpuGL::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
////////////////////////////////////////////////////////////////////////////////
-bool GrGpuGL::onWriteTexturePixels(GrTexture* texture,
+bool GrGLGpu::onWriteTexturePixels(GrTexture* texture,
int left, int top, int width, int height,
GrPixelConfig config, const void* buffer,
size_t rowBytes) {
@@ -465,7 +465,7 @@ bool GrGpuGL::onWriteTexturePixels(GrTexture* texture,
bool success = false;
if (GrPixelConfigIsCompressed(glTex->desc().fConfig)) {
- // We check that config == desc.fConfig in GrGpuGL::canWriteTexturePixels()
+ // We check that config == desc.fConfig in GrGLGpu::canWriteTexturePixels()
SkASSERT(config == glTex->desc().fConfig);
success = this->uploadCompressedTexData(glTex->desc(), buffer, false, left, top, width,
height);
@@ -517,7 +517,7 @@ static inline GrGLenum check_alloc_error(const GrSurfaceDesc& desc,
}
}
-bool GrGpuGL::uploadTexData(const GrSurfaceDesc& desc,
+bool GrGLGpu::uploadTexData(const GrSurfaceDesc& desc,
bool isNewTexture,
int left, int top, int width, int height,
GrPixelConfig dataConfig,
@@ -689,7 +689,7 @@ bool GrGpuGL::uploadTexData(const GrSurfaceDesc& desc,
// create a CompressedTexData struct that takes a desc/ptr and figures out
// the proper upload semantics. Then users can construct this function how they
// see fit if they want to go against the "standard" way to do it.
-bool GrGpuGL::uploadCompressedTexData(const GrSurfaceDesc& desc,
+bool GrGLGpu::uploadCompressedTexData(const GrSurfaceDesc& desc,
const void* data,
bool isNewTexture,
int left, int top, int width, int height) {
@@ -795,7 +795,7 @@ static bool renderbuffer_storage_msaa(GrGLContext& ctx,
return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));;
}
-bool GrGpuGL::createRenderTargetObjects(const GrSurfaceDesc& desc, GrGLuint texID,
+bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc, GrGLuint texID,
GrGLRenderTarget::IDDesc* idDesc) {
idDesc->fMSColorRenderbufferID = 0;
idDesc->fRTFBOID = 0;
@@ -913,7 +913,7 @@ static size_t as_size_t(int x) {
}
#endif
-GrTexture* GrGpuGL::onCreateTexture(const GrSurfaceDesc& origDesc,
+GrTexture* GrGLGpu::onCreateTexture(const GrSurfaceDesc& origDesc,
const void* srcData,
size_t rowBytes) {
@@ -1024,7 +1024,7 @@ GrTexture* GrGpuGL::onCreateTexture(const GrSurfaceDesc& origDesc,
return tex;
}
-GrTexture* GrGpuGL::onCreateCompressedTexture(const GrSurfaceDesc& origDesc, const void* srcData) {
+GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& origDesc, const void* srcData) {
if(SkToBool(origDesc.fFlags & kRenderTarget_GrSurfaceFlag) || origDesc.fSampleCnt > 0) {
return return_null_texture();
@@ -1118,7 +1118,7 @@ void inline get_stencil_rb_sizes(const GrGLInterface* gl,
}
}
-bool GrGpuGL::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width, int height) {
+bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width, int height) {
// All internally created RTs are also textures. We don't create
// SBs for a client's standalone RT (that is a RT that isn't also a texture).
@@ -1183,7 +1183,7 @@ bool GrGpuGL::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
return false;
}
-bool GrGpuGL::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) {
+bool GrGLGpu::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) {
GrGLRenderTarget* glrt = static_cast<GrGLRenderTarget*>(rt);
GrGLuint fbo = glrt->renderFBOID();
@@ -1248,7 +1248,7 @@ bool GrGpuGL::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTar
////////////////////////////////////////////////////////////////////////////////
-GrVertexBuffer* GrGpuGL::onCreateVertexBuffer(size_t size, bool dynamic) {
+GrVertexBuffer* GrGLGpu::onCreateVertexBuffer(size_t size, bool dynamic) {
GrGLVertexBuffer::Desc desc;
desc.fDynamic = dynamic;
desc.fSizeInBytes = size;
@@ -1281,7 +1281,7 @@ GrVertexBuffer* GrGpuGL::onCreateVertexBuffer(size_t size, bool dynamic) {
}
}
-GrIndexBuffer* GrGpuGL::onCreateIndexBuffer(size_t size, bool dynamic) {
+GrIndexBuffer* GrGLGpu::onCreateIndexBuffer(size_t size, bool dynamic) {
GrGLIndexBuffer::Desc desc;
desc.fDynamic = dynamic;
desc.fSizeInBytes = size;
@@ -1314,7 +1314,7 @@ GrIndexBuffer* GrGpuGL::onCreateIndexBuffer(size_t size, bool dynamic) {
}
}
-void GrGpuGL::flushScissor(const GrClipMaskManager::ScissorState& scissorState,
+void GrGLGpu::flushScissor(const GrClipMaskManager::ScissorState& scissorState,
const GrGLIRect& rtViewport,
GrSurfaceOrigin rtOrigin) {
if (scissorState.fEnabled) {
@@ -1344,7 +1344,7 @@ void GrGpuGL::flushScissor(const GrClipMaskManager::ScissorState& scissorState,
this->disableScissor();
}
-bool GrGpuGL::flushGraphicsState(const GrOptDrawState& optState) {
+bool GrGLGpu::flushGraphicsState(const GrOptDrawState& optState) {
// GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
SkASSERT(optState.getRenderTarget());
@@ -1387,7 +1387,7 @@ bool GrGpuGL::flushGraphicsState(const GrOptDrawState& optState) {
return true;
}
-void GrGpuGL::setupGeometry(const GrOptDrawState& optState,
+void GrGLGpu::setupGeometry(const GrOptDrawState& optState,
const GrDrawTarget::DrawInfo& info,
size_t* indexOffsetInBytes) {
GrGLVertexBuffer* vbuf;
@@ -1441,7 +1441,7 @@ void GrGpuGL::setupGeometry(const GrOptDrawState& optState,
}
}
-void GrGpuGL::buildProgramDesc(const GrOptDrawState& optState,
+void GrGLGpu::buildProgramDesc(const GrOptDrawState& optState,
const GrProgramDesc::DescInfo& descInfo,
GrGpu::DrawType drawType,
GrProgramDesc* desc) {
@@ -1450,7 +1450,7 @@ void GrGpuGL::buildProgramDesc(const GrOptDrawState& optState,
}
}
-void GrGpuGL::disableScissor() {
+void GrGLGpu::disableScissor() {
if (kNo_TriState != fHWScissorSettings.fEnabled) {
GL_CALL(Disable(GR_GL_SCISSOR_TEST));
fHWScissorSettings.fEnabled = kNo_TriState;
@@ -1458,7 +1458,7 @@ void GrGpuGL::disableScissor() {
}
}
-void GrGpuGL::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color,
+void GrGLGpu::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color,
bool canIgnoreRect) {
// parent class should never let us get here with no RT
SkASSERT(target);
@@ -1502,7 +1502,7 @@ void GrGpuGL::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color
GL_CALL(Clear(GR_GL_COLOR_BUFFER_BIT));
}
-void GrGpuGL::discard(GrRenderTarget* renderTarget) {
+void GrGLGpu::discard(GrRenderTarget* renderTarget) {
SkASSERT(renderTarget);
if (!this->caps()->discardRenderTargetSupport()) {
return;
@@ -1552,7 +1552,7 @@ void GrGpuGL::discard(GrRenderTarget* renderTarget) {
}
-void GrGpuGL::clearStencil(GrRenderTarget* target) {
+void GrGLGpu::clearStencil(GrRenderTarget* target) {
if (NULL == target) {
return;
}
@@ -1567,7 +1567,7 @@ void GrGpuGL::clearStencil(GrRenderTarget* target) {
fHWStencilSettings.invalidate();
}
-void GrGpuGL::onClearStencilClip(GrRenderTarget* target, const SkIRect& rect, bool insideClip) {
+void GrGLGpu::onClearStencilClip(GrRenderTarget* target, const SkIRect& rect, bool insideClip) {
SkASSERT(target);
// this should only be called internally when we know we have a
@@ -1605,7 +1605,7 @@ void GrGpuGL::onClearStencilClip(GrRenderTarget* target, const SkIRect& rect, bo
fHWStencilSettings.invalidate();
}
-bool GrGpuGL::readPixelsWillPayForYFlip(GrRenderTarget* renderTarget,
+bool GrGLGpu::readPixelsWillPayForYFlip(GrRenderTarget* renderTarget,
int left, int top,
int width, int height,
GrPixelConfig config,
@@ -1636,7 +1636,7 @@ bool GrGpuGL::readPixelsWillPayForYFlip(GrRenderTarget* renderTarget,
}
}
-bool GrGpuGL::onReadPixels(GrRenderTarget* target,
+bool GrGLGpu::onReadPixels(GrRenderTarget* target,
int left, int top,
int width, int height,
GrPixelConfig config,
@@ -1764,7 +1764,7 @@ bool GrGpuGL::onReadPixels(GrRenderTarget* target,
return true;
}
-void GrGpuGL::flushRenderTarget(GrGLRenderTarget* target, const SkIRect* bound) {
+void GrGLGpu::flushRenderTarget(GrGLRenderTarget* target, const SkIRect* bound) {
SkASSERT(target);
@@ -1781,7 +1781,7 @@ void GrGpuGL::flushRenderTarget(GrGLRenderTarget* target, const SkIRect* bound)
GrGLenum status;
GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
if (status != GR_GL_FRAMEBUFFER_COMPLETE) {
- SkDebugf("GrGpuGL::flushRenderTarget glCheckFramebufferStatus %x\n", status);
+ SkDebugf("GrGLGpu::flushRenderTarget glCheckFramebufferStatus %x\n", status);
}
}
#endif
@@ -1833,7 +1833,7 @@ GrGLenum gPrimitiveType2GLMode[] = {
#endif
#endif
-void GrGpuGL::onDraw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& info) {
+void GrGLGpu::onDraw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& info) {
size_t indexOffsetInBytes;
this->setupGeometry(ds, info, &indexOffsetInBytes);
@@ -1867,7 +1867,7 @@ void GrGpuGL::onDraw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& inf
#endif
}
-void GrGpuGL::onResolveRenderTarget(GrRenderTarget* target) {
+void GrGLGpu::onResolveRenderTarget(GrRenderTarget* target) {
GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(target);
if (rt->needsResolve()) {
// Some extensions automatically resolves the texture when it is read.
@@ -1961,7 +1961,7 @@ void set_gl_stencil(const GrGLInterface* gl,
}
}
-void GrGpuGL::flushStencil(const GrStencilSettings& stencilSettings, DrawType type) {
+void GrGLGpu::flushStencil(const GrStencilSettings& stencilSettings, DrawType type) {
// TODO figure out why we need to flush stencil settings on path draws at all
if (kStencilPath_DrawType != type && fHWStencilSettings != stencilSettings) {
if (stencilSettings.isDisabled()) {
@@ -1996,7 +1996,7 @@ void GrGpuGL::flushStencil(const GrStencilSettings& stencilSettings, DrawType ty
}
}
-void GrGpuGL::flushAAState(const GrOptDrawState& optState) {
+void GrGLGpu::flushAAState(const GrOptDrawState& optState) {
// At least some ATI linux drivers will render GL_LINES incorrectly when MSAA state is enabled but
// the target is not multisampled. Single pixel wide lines are rendered thicker than 1 pixel wide.
#if 0
@@ -2025,7 +2025,7 @@ void GrGpuGL::flushAAState(const GrOptDrawState& optState) {
}
}
-void GrGpuGL::flushBlend(const GrOptDrawState& optState) {
+void GrGLGpu::flushBlend(const GrOptDrawState& optState) {
// Any optimization to disable blending should have already been applied and
// tweaked the coeffs to (1, 0).
@@ -2078,7 +2078,7 @@ static inline GrGLenum tile_to_gl_wrap(SkShader::TileMode tm) {
return gWrapModes[tm];
}
-void GrGpuGL::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* texture) {
+void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* texture) {
SkASSERT(texture);
// If we created a rt/tex and rendered to it without using a texture and now we're texturing
@@ -2178,7 +2178,7 @@ void GrGpuGL::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTextur
texture->setCachedTexParams(newTexParams, this->getResetTimestamp());
}
-void GrGpuGL::flushMiscFixedFunctionState(const GrOptDrawState& optState) {
+void GrGLGpu::flushMiscFixedFunctionState(const GrOptDrawState& optState) {
if (optState.isDitherState()) {
if (kYes_TriState != fHWDitherEnabled) {
GL_CALL(Enable(GR_GL_DITHER));
@@ -2224,7 +2224,7 @@ void GrGpuGL::flushMiscFixedFunctionState(const GrOptDrawState& optState) {
}
}
-bool GrGpuGL::configToGLFormats(GrPixelConfig config,
+bool GrGLGpu::configToGLFormats(GrPixelConfig config,
bool getSizedInternalFormat,
GrGLenum* internalFormat,
GrGLenum* externalFormat,
@@ -2373,7 +2373,7 @@ bool GrGpuGL::configToGLFormats(GrPixelConfig config,
return true;
}
-void GrGpuGL::setTextureUnit(int unit) {
+void GrGLGpu::setTextureUnit(int unit) {
SkASSERT(unit >= 0 && unit < fHWBoundTextureUniqueIDs.count());
if (unit != fHWActiveTextureUnitIdx) {
GL_CALL(ActiveTexture(GR_GL_TEXTURE0 + unit));
@@ -2381,7 +2381,7 @@ void GrGpuGL::setTextureUnit(int unit) {
}
}
-void GrGpuGL::setScratchTextureUnit() {
+void GrGLGpu::setScratchTextureUnit() {
// Bind the last texture unit since it is the least likely to be used by GrGLProgram.
int lastUnitIdx = fHWBoundTextureUniqueIDs.count() - 1;
if (lastUnitIdx != fHWActiveTextureUnitIdx) {
@@ -2397,7 +2397,7 @@ namespace {
// Determines whether glBlitFramebuffer could be used between src and dst.
inline bool can_blit_framebuffer(const GrSurface* dst,
const GrSurface* src,
- const GrGpuGL* gpu,
+ const GrGLGpu* gpu,
bool* wouldNeedTempFBO = NULL) {
if (gpu->glCaps().isConfigRenderable(dst->config(), dst->desc().fSampleCnt > 0) &&
gpu->glCaps().isConfigRenderable(src->config(), src->desc().fSampleCnt > 0) &&
@@ -2419,7 +2419,7 @@ inline bool can_blit_framebuffer(const GrSurface* dst,
inline bool can_copy_texsubimage(const GrSurface* dst,
const GrSurface* src,
- const GrGpuGL* gpu,
+ const GrGLGpu* gpu,
bool* wouldNeedTempFBO = NULL) {
// Table 3.9 of the ES2 spec indicates the supported formats with CopyTexSubImage
// and BGRA isn't in the spec. There doesn't appear to be any extension that adds it. Perhaps
@@ -2457,7 +2457,7 @@ inline bool can_copy_texsubimage(const GrSurface* dst,
// If a temporary FBO was created, its non-zero ID is returned. The viewport that the copy rect is
// relative to is output.
-GrGLuint GrGpuGL::bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport) {
+GrGLuint GrGLGpu::bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport) {
GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(surface->asRenderTarget());
GrGLuint tempFBOID;
if (NULL == rt) {
@@ -2484,7 +2484,7 @@ GrGLuint GrGpuGL::bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLI
return tempFBOID;
}
-bool GrGpuGL::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) {
+bool GrGLGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) {
// In here we look for opportunities to use CopyTexSubImage, or fbo blit. If neither are
// possible and we return false to fallback to creating a render target dst for render-to-
// texture. This code prefers CopyTexSubImage to fbo blit and avoids triggering temporary fbo
@@ -2527,7 +2527,7 @@ bool GrGpuGL::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc)
return true;
}
-bool GrGpuGL::copySurface(GrSurface* dst,
+bool GrGLGpu::copySurface(GrSurface* dst,
GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) {
@@ -2630,7 +2630,7 @@ bool GrGpuGL::copySurface(GrSurface* dst,
return copied;
}
-bool GrGpuGL::canCopySurface(const GrSurface* dst,
+bool GrGLGpu::canCopySurface(const GrSurface* dst,
const GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) {
@@ -2655,7 +2655,7 @@ bool GrGpuGL::canCopySurface(const GrSurface* dst,
return false;
}
-void GrGpuGL::didAddGpuTraceMarker() {
+void GrGLGpu::didAddGpuTraceMarker() {
if (this->caps()->gpuTracingSupport()) {
const GrTraceMarkerSet& markerArray = this->getActiveTraceMarkers();
SkString markerString = markerArray.toStringLast();
@@ -2663,7 +2663,7 @@ void GrGpuGL::didAddGpuTraceMarker() {
}
}
-void GrGpuGL::didRemoveGpuTraceMarker() {
+void GrGLGpu::didRemoveGpuTraceMarker() {
if (this->caps()->gpuTracingSupport()) {
GL_CALL(PopGroupMarker());
}
@@ -2671,8 +2671,8 @@ void GrGpuGL::didRemoveGpuTraceMarker() {
///////////////////////////////////////////////////////////////////////////////
-GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw(
- GrGpuGL* gpu,
+GrGLAttribArrayState* GrGLGpu::HWGeometryState::bindArrayAndBuffersToDraw(
+ GrGLGpu* gpu,
const GrGLVertexBuffer* vbuffer,
const GrGLIndexBuffer* ibuffer) {
SkASSERT(vbuffer);
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index 76995b921d..9e892f8f1d 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -27,10 +27,10 @@
#define PROGRAM_CACHE_STATS
#endif
-class GrGpuGL : public GrGpu {
+class GrGLGpu : public GrGpu {
public:
- GrGpuGL(const GrGLContext& ctx, GrContext* context);
- virtual ~GrGpuGL();
+ GrGLGpu(const GrGLContext& ctx, GrContext* context);
+ virtual ~GrGLGpu();
virtual void contextAbandoned() SK_OVERRIDE;
@@ -180,7 +180,7 @@ private:
class ProgramCache : public ::SkNoncopyable {
public:
- ProgramCache(GrGpuGL* gpu);
+ ProgramCache(GrGLGpu* gpu);
~ProgramCache();
void abandon();
@@ -210,7 +210,7 @@ private:
int fCount;
unsigned int fCurrLRUStamp;
- GrGpuGL* fGpu;
+ GrGLGpu* fGpu;
#ifdef PROGRAM_CACHE_STATS
int fTotalRequests;
int fCacheMisses;
@@ -332,7 +332,7 @@ private:
}
}
- void setVertexArrayID(GrGpuGL* gpu, GrGLuint arrayID) {
+ void setVertexArrayID(GrGLGpu* gpu, GrGLuint arrayID) {
if (!gpu->glCaps().vertexArrayObjectSupport()) {
SkASSERT(0 == arrayID);
return;
@@ -364,7 +364,7 @@ private:
}
}
- void setVertexBufferID(GrGpuGL* gpu, GrGLuint id) {
+ void setVertexBufferID(GrGLGpu* gpu, GrGLuint id) {
if (!fBoundVertexBufferIDIsValid || id != fBoundVertexBufferID) {
GR_GL_CALL(gpu->glInterface(), BindBuffer(GR_GL_ARRAY_BUFFER, id));
fBoundVertexBufferIDIsValid = true;
@@ -376,7 +376,7 @@ private:
* Binds the default vertex array and binds the index buffer. This is used when binding
* an index buffer in order to update it.
*/
- void setIndexBufferIDOnDefaultVertexArray(GrGpuGL* gpu, GrGLuint id) {
+ void setIndexBufferIDOnDefaultVertexArray(GrGLGpu* gpu, GrGLuint id) {
this->setVertexArrayID(gpu, 0);
if (!fDefaultVertexArrayBoundIndexBufferIDIsValid ||
id != fDefaultVertexArrayBoundIndexBufferID) {
@@ -392,7 +392,7 @@ private:
* buffer is bound. The index buffer (if non-NULL) is bound to the vertex array. The
* returned GrGLAttribArrayState should be used to set vertex attribute arrays.
*/
- GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGpuGL* gpu,
+ GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu,
const GrGLVertexBuffer* vbuffer,
const GrGLIndexBuffer* ibuffer);
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index f094ee9c80..1a04341504 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -22,7 +22,7 @@ SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false,
typedef GrGLProgramDataManager::UniformHandle UniformHandle;
-struct GrGpuGL::ProgramCache::Entry {
+struct GrGLGpu::ProgramCache::Entry {
SK_DECLARE_INST_COUNT_ROOT(Entry);
Entry() : fProgram(NULL), fLRUStamp(0) {}
@@ -30,7 +30,7 @@ struct GrGpuGL::ProgramCache::Entry {
unsigned int fLRUStamp;
};
-struct GrGpuGL::ProgramCache::ProgDescLess {
+struct GrGLGpu::ProgramCache::ProgDescLess {
bool operator() (const GrProgramDesc& desc, const Entry* entry) {
SkASSERT(entry->fProgram.get());
return GrProgramDesc::Less(desc, entry->fProgram->getDesc());
@@ -42,7 +42,7 @@ struct GrGpuGL::ProgramCache::ProgDescLess {
}
};
-GrGpuGL::ProgramCache::ProgramCache(GrGpuGL* gpu)
+GrGLGpu::ProgramCache::ProgramCache(GrGLGpu* gpu)
: fCount(0)
, fCurrLRUStamp(0)
, fGpu(gpu)
@@ -57,7 +57,7 @@ GrGpuGL::ProgramCache::ProgramCache(GrGpuGL* gpu)
}
}
-GrGpuGL::ProgramCache::~ProgramCache() {
+GrGLGpu::ProgramCache::~ProgramCache() {
for (int i = 0; i < fCount; ++i){
SkDELETE(fEntries[i]);
}
@@ -77,7 +77,7 @@ GrGpuGL::ProgramCache::~ProgramCache() {
#endif
}
-void GrGpuGL::ProgramCache::abandon() {
+void GrGLGpu::ProgramCache::abandon() {
for (int i = 0; i < fCount; ++i) {
SkASSERT(fEntries[i]->fProgram.get());
fEntries[i]->fProgram->abandon();
@@ -86,12 +86,12 @@ void GrGpuGL::ProgramCache::abandon() {
fCount = 0;
}
-int GrGpuGL::ProgramCache::search(const GrProgramDesc& desc) const {
+int GrGLGpu::ProgramCache::search(const GrProgramDesc& desc) const {
ProgDescLess less;
return SkTSearch(fEntries, fCount, desc, sizeof(Entry*), less);
}
-GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrOptDrawState& optState) {
+GrGLProgram* GrGLGpu::ProgramCache::getProgram(const GrOptDrawState& optState) {
#ifdef PROGRAM_CACHE_STATS
++fTotalRequests;
#endif
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index b6daca7978..7f21fbd631 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -79,7 +79,7 @@ GrGLFragmentShaderBuilder::GrGLFragmentShaderBuilder(GrGLProgramBuilder* program
bool GrGLFragmentShaderBuilder::enableFeature(GLSLFeature feature) {
switch (feature) {
case kStandardDerivatives_GLSLFeature: {
- GrGpuGL* gpu = fProgramBuilder->gpu();
+ GrGLGpu* gpu = fProgramBuilder->gpu();
if (!gpu->glCaps().shaderDerivativeSupport()) {
return false;
}
@@ -115,7 +115,7 @@ SkString GrGLFragmentShaderBuilder::ensureFSCoords2D(
const char* GrGLFragmentShaderBuilder::fragmentPosition() {
fHasReadFragmentPosition = true;
- GrGpuGL* gpu = fProgramBuilder->gpu();
+ GrGLGpu* gpu = fProgramBuilder->gpu();
// We only declare "gl_FragCoord" when we're in the case where we want to use layout qualifiers
// to reverse y. Otherwise it isn't necessary and whether the "in" qualifier appears in the
// declaration varies in earlier GLSL specs. So it is simpler to omit it.
@@ -166,7 +166,7 @@ const char* GrGLFragmentShaderBuilder::fragmentPosition() {
const char* GrGLFragmentShaderBuilder::dstColor() {
fHasReadDstColor = true;
- GrGpuGL* gpu = fProgramBuilder->gpu();
+ GrGLGpu* gpu = fProgramBuilder->gpu();
if (gpu->glCaps().fbFetchSupport()) {
this->addFeature(1 << (GrGLFragmentShaderBuilder::kLastGLSLPrivateFeature + 1),
gpu->glCaps().fbFetchExtensionString());
@@ -258,7 +258,7 @@ const char* GrGLFragmentShaderBuilder::getSecondaryColorOutputName() const {
bool GrGLFragmentShaderBuilder::compileAndAttachShaders(GrGLuint programId,
SkTDArray<GrGLuint>* shaderIds) const {
- GrGpuGL* gpu = fProgramBuilder->gpu();
+ GrGLGpu* gpu = fProgramBuilder->gpu();
SkString fragShaderSrc(GrGetGLSLVersionDecl(gpu->ctxInfo()));
fragShaderSrc.append(fExtensions);
append_default_precision_qualifier(kDefault_GrSLPrecision,
diff --git a/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.cpp b/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.cpp
index 696c9a5c7f..eeb9974959 100644
--- a/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.cpp
@@ -8,7 +8,7 @@
#include "GrGLLegacyNvprProgramBuilder.h"
#include "../GrGpuGL.h"
-GrGLLegacyNvprProgramBuilder::GrGLLegacyNvprProgramBuilder(GrGpuGL* gpu,
+GrGLLegacyNvprProgramBuilder::GrGLLegacyNvprProgramBuilder(GrGLGpu* gpu,
const GrOptDrawState& optState)
: INHERITED(gpu, optState)
, fTexCoordSetCnt(0) {
diff --git a/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h b/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h
index 7f7b0fc41c..f34f6ccd26 100644
--- a/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h
@@ -12,7 +12,7 @@
class GrGLLegacyNvprProgramBuilder : public GrGLProgramBuilder {
public:
- GrGLLegacyNvprProgramBuilder(GrGpuGL*, const GrOptDrawState&);
+ GrGLLegacyNvprProgramBuilder(GrGLGpu*, const GrOptDrawState&);
virtual GrGLProgram* createProgram(GrGLuint programID) SK_OVERRIDE;
diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
index 063526d464..b835306986 100644
--- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
@@ -11,7 +11,7 @@
#define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X)
#define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X)
-GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGpuGL* gpu,
+GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGLGpu* gpu,
const GrOptDrawState& optState)
: INHERITED(gpu, optState)
, fSeparableVaryingInfos(kVarsPerBlock) {
diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.h b/src/gpu/gl/builders/GrGLNvprProgramBuilder.h
index 5f239055fa..cfb07fd254 100644
--- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.h
@@ -12,7 +12,7 @@
class GrGLNvprProgramBuilder : public GrGLProgramBuilder {
public:
- GrGLNvprProgramBuilder(GrGpuGL*, const GrOptDrawState&);
+ GrGLNvprProgramBuilder(GrGLGpu*, const GrOptDrawState&);
/*
* The separable varying info must be passed to GrGLProgram so this must
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index bbae592157..6f3214f23a 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -26,7 +26,7 @@
const int GrGLProgramBuilder::kVarsPerBlock = 8;
-GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrOptDrawState& optState, GrGpuGL* gpu) {
+GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrOptDrawState& optState, GrGLGpu* gpu) {
// create a builder. This will be handed off to effects so they can use it to add
// uniforms, varyings, textures, etc
SkAutoTDelete<GrGLProgramBuilder> builder(CreateProgramBuilder(optState,
@@ -54,7 +54,7 @@ GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrOptDrawState& optState, G
GrGLProgramBuilder* GrGLProgramBuilder::CreateProgramBuilder(const GrOptDrawState& optState,
bool hasGeometryProcessor,
- GrGpuGL* gpu) {
+ GrGLGpu* gpu) {
const GrProgramDesc& desc = optState.programDesc();
if (GrGLProgramDescBuilder::GetHeader(desc).fUseNvpr) {
SkASSERT(gpu->glCaps().pathRenderingSupport());
@@ -72,7 +72,7 @@ GrGLProgramBuilder* GrGLProgramBuilder::CreateProgramBuilder(const GrOptDrawStat
/////////////////////////////////////////////////////////////////////////////
-GrGLProgramBuilder::GrGLProgramBuilder(GrGpuGL* gpu, const GrOptDrawState& optState)
+GrGLProgramBuilder::GrGLProgramBuilder(GrGLGpu* gpu, const GrOptDrawState& optState)
: fVS(this)
, fGS(this)
, fFS(this, optState.programDesc().header().fFragPosKey)
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h
index e4c5f3168e..3fdccca393 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
@@ -71,7 +71,7 @@ public:
virtual const GrGLContextInfo& ctxInfo() const = 0;
- virtual GrGpuGL* gpu() const = 0;
+ virtual GrGLGpu* gpu() const = 0;
/*
* *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
@@ -205,7 +205,7 @@ public:
* to be used.
* @return true if generation was successful.
*/
- static GrGLProgram* CreateProgram(const GrOptDrawState&, GrGpuGL*);
+ static GrGLProgram* CreateProgram(const GrOptDrawState&, GrGLGpu*);
UniformHandle addUniformArray(uint32_t visibility,
GrSLType type,
@@ -224,7 +224,7 @@ public:
const GrGLContextInfo& ctxInfo() const SK_OVERRIDE;
- GrGpuGL* gpu() const SK_OVERRIDE { return fGpu; }
+ GrGLGpu* gpu() const SK_OVERRIDE { return fGpu; }
GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { return &fFS; }
GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fVS; }
@@ -259,9 +259,9 @@ protected:
static GrGLProgramBuilder* CreateProgramBuilder(const GrOptDrawState&,
bool hasGeometryProcessor,
- GrGpuGL*);
+ GrGLGpu*);
- GrGLProgramBuilder(GrGpuGL*, const GrOptDrawState&);
+ GrGLProgramBuilder(GrGLGpu*, const GrOptDrawState&);
const GrOptDrawState& optState() const { return fOptState; }
const GrProgramDesc& desc() const { return fDesc; }
@@ -377,7 +377,7 @@ protected:
const GrOptDrawState& fOptState;
const GrProgramDesc& fDesc;
- GrGpuGL* fGpu;
+ GrGLGpu* fGpu;
UniformInfoArray fUniforms;
SkSTArray<16, TransformVarying, true> fCoordVaryings;
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
index 36d124f387..d8dabae760 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
@@ -21,7 +21,7 @@ inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen)
}
}
void append_texture_lookup(SkString* out,
- GrGpuGL* gpu,
+ GrGLGpu* gpu,
const char* samplerName,
const char* coordName,
uint32_t configComponentMask,
diff --git a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
index 5f66420eda..1d97e85234 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -85,7 +85,7 @@ void GrGLVertexBuilder::bindVertexAttributes(GrGLuint programID) {
bool GrGLVertexBuilder::compileAndAttachShaders(GrGLuint programId,
SkTDArray<GrGLuint>* shaderIds) const {
- GrGpuGL* gpu = fProgramBuilder->gpu();
+ GrGLGpu* gpu = fProgramBuilder->gpu();
const GrGLContext& glCtx = gpu->glContext();
const GrGLContextInfo& ctxInfo = gpu->ctxInfo();
SkString vertShaderSrc(GrGetGLSLVersionDecl(ctxInfo));