aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/debug/DebugGLTestContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/gl/debug/DebugGLTestContext.cpp')
-rw-r--r--tools/gpu/gl/debug/DebugGLTestContext.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/gpu/gl/debug/DebugGLTestContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp
index 3a2c0b93f6..01e151cb76 100644
--- a/tools/gpu/gl/debug/DebugGLTestContext.cpp
+++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp
@@ -789,7 +789,7 @@ public:
GrGLvoid bindVertexArray(GrGLuint id) override {
GrVertexArrayObj* array = FIND(id, GrVertexArrayObj, kVertexArray_ObjTypes);
GrAlwaysAssert((0 == id) || array);
- this->setVertexArray(array);
+ this->setVertexArray(sk_ref_sp(array));
}
GrGLvoid bindBuffer(GrGLenum target, GrGLuint bufferID) override {
@@ -939,7 +939,7 @@ private:
GrGLuint fCurrTextureUnit;
GrTextureUnitObj* fTextureUnits[kDefaultMaxTextureUnits];
GrBufferObj* fBoundBuffers[kNumBufferTargets];
- GrVertexArrayObj* fVertexArray;
+ sk_sp<GrVertexArrayObj> fVertexArray;
GrGLint fPackRowLength;
GrGLint fUnpackRowLength;
GrGLint fPackAlignment;
@@ -1089,14 +1089,14 @@ private:
fBoundBuffers[buffIdx] = buffer;
}
- void setVertexArray(GrVertexArrayObj* vertexArray) {
+ void setVertexArray(sk_sp<GrVertexArrayObj> vertexArray) {
if (vertexArray) {
SkASSERT(!vertexArray->getDeleted());
}
- SkRefCnt_SafeAssign(fVertexArray, vertexArray);
+ fVertexArray = std::move(vertexArray);
}
- GrVertexArrayObj* getVertexArray() { return fVertexArray; }
+ GrVertexArrayObj* getVertexArray() { return fVertexArray.get(); }
void setTexture(GrTextureObj *texture) {
fTextureUnits[fCurrTextureUnit]->setTexture(texture);