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

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

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 6 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/batches/GrVertexBatch.cpp ('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 9cce41c76da178efcbc836f8a0c23cc41914c9e1..aead715d1efc8907cbb8c3fc9c185e3ae208b4bd 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -54,7 +54,7 @@ public:
return static_cast<GrGLPathRendering*>(pathRendering());
}
- void discard(GrRenderTarget*) override;
+ void discard(GrRenderTarget*);
// Used by GrGLProgram to configure OpenGL state.
void bindTexture(int unitIdx, const GrTextureParams& params, bool allowSRGBInputs,
@@ -95,17 +95,34 @@ public:
// Called by GrGLBuffer after its buffer object has been destroyed.
void notifyBufferReleased(const GrGLBuffer*);
+ // The GrGLGpuCommandBuffer does not buffer up draws before submitting them to the gpu.
+ // Thus this is the implementation of the draw call for the corresponding passthrough function
+ // on GrGLGpuCommandBuffer.
+ void draw(const GrPipeline&,
+ const GrPrimitiveProcessor&,
+ const GrMesh*,
+ int meshCount);
+
+ // The GrGLGpuCommandBuffer does not buffer up draws before submitting them to the gpu.
+ // Thus this is the implementation of the clear call for the corresponding passthrough function
+ // on GrGLGpuCommandBuffer.
+ void clear(const SkIRect& rect, GrColor color, GrRenderTarget* renderTarget);
+
+ // The GrGLGpuCommandBuffer does not buffer up draws before submitting them to the gpu.
+ // Thus this is the implementation of the clearStencil call for the corresponding passthrough
+ // function on GrGLGpuCommandBuffer.
+ void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* renderTarget);
+
const GrGLContext* glContextForTesting() const override {
return &this->glContext();
}
void clearStencil(GrRenderTarget*) override;
- GrGpuCommandBuffer* createCommandBuffer(const GrRenderTarget& target,
- GrGpuCommandBuffer::LoadAndStoreOp colorOp,
- GrColor colorClear,
- GrGpuCommandBuffer::LoadAndStoreOp stencilOp,
- GrColor stencilClear) override;
+ GrGpuCommandBuffer* createCommandBuffer(
+ GrRenderTarget* target,
+ const GrGpuCommandBuffer::LoadAndStoreInfo& colorInfo,
+ const GrGpuCommandBuffer::LoadAndStoreInfo& stencilInfo) override;
void invalidateBoundRenderTarget() {
fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID;
@@ -159,10 +176,6 @@ private:
bool renderTarget, GrGLTexture::TexParams* initialTexParams,
const SkTArray<GrMipLevel>& texels);
- void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override;
-
- void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) override;
-
bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&,
GrTextureProducer::CopyParams*) const override;
@@ -199,11 +212,6 @@ private:
void onResolveRenderTarget(GrRenderTarget* target) override;
- void onDraw(const GrPipeline&,
- const GrPrimitiveProcessor&,
- const GrMesh*,
- int meshCount) override;
-
bool onCopySurface(GrSurface* dst,
GrSurface* src,
const SkIRect& srcRect,
« no previous file with comments | « src/gpu/batches/GrVertexBatch.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698