aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-02-17 14:04:46 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-17 14:04:46 -0800
commitd2d2eb9a01777d8b1653407d8cb04eb21ce30bd2 (patch)
tree0b25764d79ceb8774b6e2092bed5a9c7f6579a68 /src
parent48e78468f5f6b900d476e616bdb1ba457c8f0b2a (diff)
Add GrGpu support for Vulkan command buffer flush
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrDrawTarget.cpp2
-rw-r--r--src/gpu/GrGpu.cpp3
-rw-r--r--src/gpu/GrGpu.h5
-rw-r--r--src/gpu/gl/GrGLGpu.cpp2
-rw-r--r--src/gpu/gl/GrGLGpu.h2
5 files changed, 6 insertions, 8 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 9f15c11508..b9edabeafe 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -214,7 +214,7 @@ void GrDrawTarget::drawBatches(GrBatchFlushState* flushState) {
fBatches[i]->draw(flushState);
}
- fGpu->performFlushWorkaround();
+ fGpu->finishDrawTarget();
}
void GrDrawTarget::reset() {
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 32072b4976..e7adf0b321 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -369,9 +369,6 @@ void GrGpu::resolveRenderTarget(GrRenderTarget* target) {
this->onResolveRenderTarget(target);
}
-void GrGpu::performFlushWorkaround() {
-}
-
////////////////////////////////////////////////////////////////////////////////
void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 0567dd268c..147c481020 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -349,8 +349,9 @@ public:
void draw(const DrawArgs&, const GrVertices&);
- // Called by drawtarget when flushing. Provides a hook for working around an ARM PLS driver bug.
- virtual void performFlushWorkaround();
+ // Called by drawtarget when flushing.
+ // Provides a hook for post-flush actions (e.g. PLS reset and Vulkan command buffer submits).
+ virtual void finishDrawTarget() {}
///////////////////////////////////////////////////////////////////////////
// Debugging and Stats
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index b10592a902..73d219d033 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2427,7 +2427,7 @@ bool GrGLGpu::onReadPixels(GrSurface* surface,
return true;
}
-void GrGLGpu::performFlushWorkaround() {
+void GrGLGpu::finishDrawTarget() {
if (fPLSHasBeenUsed) {
/* There is an ARM driver bug where if we use PLS, and then draw a frame which does not
* use PLS, it leaves garbage all over the place. As a workaround, we use PLS in a
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index b9439b7d85..00acd34d9d 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -134,7 +134,7 @@ public:
void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override;
- void performFlushWorkaround() override;
+ void finishDrawTarget() override;
private:
GrGLGpu(GrGLContext* ctx, GrContext* context);