aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-06-03 08:50:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-03 08:50:54 -0700
commit1897cfd7a6e193b42ca95e830e9485f5201a995c (patch)
tree697ddd44873c615bce81250008735d2b47a9e40b /include
parentb73c24b01a411843a98d4ccab7a39341d927e7fd (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrBufferAccess.h8
1 files changed, 2 insertions, 6 deletions
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<GrBuffer> fBuffer;
GrShaderFlags fVisibility;