aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTest.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2016-03-25 01:54:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-25 01:54:55 -0700
commit8b1bff29675afd25843439eade634a57f68fe16f (patch)
tree07e7676e54f5520b14e2e1896c64e96b4f61f3c3 /src/gpu/GrTest.cpp
parent6b3eacb0dfaeb3374d410c8c041bd39cd066e1ea (diff)
Consolidate GPU buffer implementations
Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Review URL: https://codereview.chromium.org/1825393002
Diffstat (limited to 'src/gpu/GrTest.cpp')
-rw-r--r--src/gpu/GrTest.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp
index c9b26e284a..2b6463d853 100644
--- a/src/gpu/GrTest.cpp
+++ b/src/gpu/GrTest.cpp
@@ -345,11 +345,7 @@ private:
return nullptr;
}
- GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override { return nullptr; }
-
- GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override { return nullptr; }
-
- GrTransferBuffer* onCreateTransferBuffer(size_t, TransferType) override { return nullptr; }
+ GrBuffer* onCreateBuffer(GrBufferType, size_t, GrAccessPattern) override { return nullptr; }
void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override {}
@@ -376,7 +372,7 @@ private:
bool onTransferPixels(GrSurface* surface,
int left, int top, int width, int height,
- GrPixelConfig config, GrTransferBuffer* buffer,
+ GrPixelConfig config, GrBuffer* transferBuffer,
size_t offset, size_t rowBytes) override {
return false;
}
@@ -410,7 +406,7 @@ GrContext* GrContext::CreateMockContext() {
void GrContext::initMockContext() {
GrContextOptions options;
- options.fGeometryBufferMapThreshold = 0;
+ options.fBufferMapThreshold = 0;
SkASSERT(nullptr == fGpu);
fGpu = new MockGpu(this, options);
SkASSERT(fGpu);