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

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

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: asserts Created 4 years, 9 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/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index bcb3c193dc6a5b537546ef40e6edf97a44e55dfc..bc79d2f427f5a803f1946a15e6f3fa015bbf9eb1 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -10,15 +10,12 @@
#include "GrGLContext.h"
#include "GrGLIRect.h"
-#include "GrGLIndexBuffer.h"
#include "GrGLPathRendering.h"
#include "GrGLProgram.h"
#include "GrGLRenderTarget.h"
#include "GrGLStencilAttachment.h"
#include "GrGLTexture.h"
-#include "GrGLTransferBuffer.h"
#include "GrGLVertexArray.h"
-#include "GrGLVertexBuffer.h"
#include "GrGpu.h"
#include "GrPipelineBuilder.h"
#include "GrTypes.h"
@@ -26,6 +23,7 @@
#include "SkTArray.h"
#include "SkTypes.h"
+class GrGLBuffer;
class GrPipeline;
class GrNonInstancedMesh;
class GrSwizzle;
@@ -101,15 +99,6 @@ public:
void releaseBuffer(GrGLuint id, GrGLenum type);
- // sizes are in bytes
- void* mapBuffer(GrGLuint id, GrGLenum type, GrGLBufferImpl::Usage usage, size_t currentSize,
- size_t requestedSize);
-
- void unmapBuffer(GrGLuint id, GrGLenum type, void* mapPtr);
-
- void bufferData(GrGLuint id, GrGLenum type, GrGLBufferImpl::Usage usage, size_t currentSize,
- const void* src, size_t srcSizeInBytes);
-
const GrGLContext* glContextForTesting() const override {
return &this->glContext();
}
@@ -149,9 +138,7 @@ private:
GrGpuResource::LifeCycle lifeCycle,
const SkTArray<GrMipLevel>& texels) override;
- GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override;
- GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override;
- GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) override;
+ GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern) override;
GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership) override;
GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&,
GrWrapOwnership) override;
@@ -208,7 +195,7 @@ private:
bool onTransferPixels(GrSurface*,
int left, int top, int width, int height,
- GrPixelConfig config, GrTransferBuffer* buffer,
+ GrPixelConfig config, GrBuffer* transferBuffer,
size_t offset, size_t rowBytes) override;
void onResolveRenderTarget(GrRenderTarget* target) override;
@@ -511,8 +498,8 @@ private:
* returned GrGLAttribArrayState should be used to set vertex attribute arrays.
*/
GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu,
- const GrGLVertexBuffer* vbuffer,
- const GrGLIndexBuffer* ibuffer);
+ const GrGLBuffer* vbuffer,
+ const GrGLBuffer* ibuffer);
/** Variants of the above that takes GL buffer IDs. Note that 0 does not imply that a
buffer won't be bound. The "default buffer" will be bound, which is used for client-side
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698