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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2301523003: Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids (Closed)
Patch Set: update to ToT Created 4 years, 4 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
« no previous file with comments | « src/gpu/effects/GrSingleTextureEffect.h ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index a141767e893f230548e549892abb3f051e86d6c6..466af6c6ab4bda73273d0361dfe8fc82b376c704 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2149,7 +2149,7 @@ GrGLenum GrGLGpu::bindBuffer(GrBufferType type, const GrBuffer* buffer) {
SkASSERT(type >= 0 && type <= kLast_GrBufferType);
auto& bufferState = fHWBufferState[type];
- if (buffer->getUniqueID() != bufferState.fBoundBufferUniqueID) {
+ if (buffer->uniqueID() != bufferState.fBoundBufferUniqueID) {
if (buffer->isCPUBacked()) {
if (!bufferState.fBufferZeroKnownBound) {
GL_CALL(BindBuffer(bufferState.fGLTarget, 0));
@@ -2159,7 +2159,7 @@ GrGLenum GrGLGpu::bindBuffer(GrBufferType type, const GrBuffer* buffer) {
GL_CALL(BindBuffer(bufferState.fGLTarget, glBuffer->bufferID()));
}
bufferState.fBufferZeroKnownBound = buffer->isCPUBacked();
- bufferState.fBoundBufferUniqueID = buffer->getUniqueID();
+ bufferState.fBoundBufferUniqueID = buffer->uniqueID();
}
return bufferState.fGLTarget;
@@ -2168,7 +2168,7 @@ GrGLenum GrGLGpu::bindBuffer(GrBufferType type, const GrBuffer* buffer) {
void GrGLGpu::notifyBufferReleased(const GrGLBuffer* buffer) {
if (buffer->hasAttachedToTexture()) {
// Detach this buffer from any textures to ensure the underlying memory is freed.
- uint32_t uniqueID = buffer->getUniqueID();
+ uint32_t uniqueID = buffer->uniqueID();
for (int i = fHWMaxUsedBufferTextureUnit; i >= 0; --i) {
auto& buffTex = fHWBufferTextures[i];
if (uniqueID != buffTex.fAttachedBufferUniqueID) {
@@ -2656,7 +2656,7 @@ void GrGLGpu::finishDrawTarget() {
void GrGLGpu::flushRenderTarget(GrGLRenderTarget* target, const SkIRect* bounds, bool disableSRGB) {
SkASSERT(target);
- uint32_t rtID = target->getUniqueID();
+ uint32_t rtID = target->uniqueID();
if (fHWBoundRenderTargetUniqueID != rtID) {
fStats.incRenderTargetBinds();
GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, target->renderFBOID()));
@@ -3178,7 +3178,7 @@ void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, bool allow
this->onResolveRenderTarget(texRT);
}
- uint32_t textureID = texture->getUniqueID();
+ uint32_t textureID = texture->uniqueID();
GrGLenum target = texture->target();
if (fHWBoundTextureUniqueIDs[unitIdx] != textureID) {
this->setTextureUnit(unitIdx);
@@ -3296,7 +3296,7 @@ void GrGLGpu::bindTexelBuffer(int unitIdx, GrPixelConfig texelConfig, GrGLBuffer
buffTex.fKnownBound = true;
}
- if (buffer->getUniqueID() != buffTex.fAttachedBufferUniqueID ||
+ if (buffer->uniqueID() != buffTex.fAttachedBufferUniqueID ||
buffTex.fTexelConfig != texelConfig) {
this->setTextureUnit(unitIdx);
@@ -3305,7 +3305,7 @@ void GrGLGpu::bindTexelBuffer(int unitIdx, GrPixelConfig texelConfig, GrGLBuffer
buffer->bufferID()));
buffTex.fTexelConfig = texelConfig;
- buffTex.fAttachedBufferUniqueID = buffer->getUniqueID();
+ buffTex.fAttachedBufferUniqueID = buffer->uniqueID();
if (this->glCaps().textureSwizzleSupport() &&
this->glCaps().configSwizzle(texelConfig) != buffTex.fSwizzle) {
« no previous file with comments | « src/gpu/effects/GrSingleTextureEffect.h ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698