From 1897cfd7a6e193b42ca95e830e9485f5201a995c Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Fri, 3 Jun 2016 08:50:54 -0700 Subject: Abandon offset support with texel buffers We don't seem to require nonzero offsets for texel buffers at this point in time, and requiring this feature greatly reduces the number of desktop clients that can use texel buffers. If we find a use for offsets later we can always add it back as a separate feature. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036953002 Review-Url: https://codereview.chromium.org/2036953002 --- include/gpu/GrBufferAccess.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/gpu/GrBufferAccess.h b/include/gpu/GrBufferAccess.h index 183d43d670..a5d8f0a684 100644 --- a/include/gpu/GrBufferAccess.h +++ b/include/gpu/GrBufferAccess.h @@ -20,24 +20,21 @@ public: /** * Must be initialized before adding to a GrProcessor's buffer access list. */ - void reset(intptr_t offsetInBytes, GrPixelConfig texelConfig, GrBuffer* buffer, + void reset(GrPixelConfig texelConfig, GrBuffer* buffer, GrShaderFlags visibility = kFragment_GrShaderFlag) { - fOffsetInBytes = offsetInBytes; fTexelConfig = texelConfig; fBuffer.set(SkRef(buffer), kRead_GrIOType); fVisibility = visibility; } bool operator==(const GrBufferAccess& that) const { - return fOffsetInBytes == that.fOffsetInBytes && - fTexelConfig == that.fTexelConfig && + return fTexelConfig == that.fTexelConfig && this->buffer() == that.buffer() && fVisibility == that.fVisibility; } bool operator!=(const GrBufferAccess& that) const { return !(*this == that); } - intptr_t offsetInBytes() const { return fOffsetInBytes; } GrPixelConfig texelConfig() const { return fTexelConfig; } GrBuffer* buffer() const { return fBuffer.get(); } GrShaderFlags visibility() const { return fVisibility; } @@ -48,7 +45,6 @@ public: const GrGpuResourceRef* getProgramBuffer() const { return &fBuffer;} private: - intptr_t fOffsetInBytes; GrPixelConfig fTexelConfig; GrTGpuResourceRef fBuffer; GrShaderFlags fVisibility; -- cgit v1.2.3