Add GrGpu support for Vulkan command buffer flush

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1705133002

Review URL: https://codereview.chromium.org/1705133002
This commit is contained in:
jvanverth 2016-02-17 14:04:46 -08:00 committed by Commit bot
parent 48e78468f5
commit d2d2eb9a01
5 changed files with 6 additions and 8 deletions

View File

@ -214,7 +214,7 @@ void GrDrawTarget::drawBatches(GrBatchFlushState* flushState) {
fBatches[i]->draw(flushState);
}
fGpu->performFlushWorkaround();
fGpu->finishDrawTarget();
}
void GrDrawTarget::reset() {

View File

@ -369,9 +369,6 @@ void GrGpu::resolveRenderTarget(GrRenderTarget* target) {
this->onResolveRenderTarget(target);
}
void GrGpu::performFlushWorkaround() {
}
////////////////////////////////////////////////////////////////////////////////
void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {

View File

@ -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

View File

@ -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

View File

@ -134,7 +134,7 @@ public:
void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override;
void performFlushWorkaround() override;
void finishDrawTarget() override;
private:
GrGLGpu(GrGLContext* ctx, GrContext* context);