Revert to old behavior for swap buffers
New behavior is preserved with 'syncOrSwap' call BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606883005 Review URL: https://codereview.chromium.org/1606883005
This commit is contained in:
parent
ae473fdfc3
commit
01836add2a
@ -156,7 +156,7 @@ struct GPUTarget : public Target {
|
||||
void endTiming() override {
|
||||
if (this->gl) {
|
||||
SK_GL(*this->gl, Flush());
|
||||
this->gl->swapBuffers();
|
||||
this->gl->waitOnSyncOrSwap();
|
||||
}
|
||||
}
|
||||
void fence() override {
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
*/
|
||||
virtual GrGLuint eglImageToExternalTexture(GrEGLImage) const { return 0; }
|
||||
|
||||
void swapBuffers();
|
||||
|
||||
/**
|
||||
* The only purpose of this function it to provide a means of scheduling
|
||||
* work on the GPU (since all of the subclasses create primary buffers for
|
||||
@ -65,7 +67,7 @@ public:
|
||||
* not perform some sort of synchronization, depending on whether the
|
||||
* drawing surface provided by the platform is double buffered.
|
||||
*/
|
||||
void swapBuffers();
|
||||
void waitOnSyncOrSwap();
|
||||
|
||||
/**
|
||||
* This notifies the context that we are deliberately testing abandoning
|
||||
|
@ -78,9 +78,13 @@ void SkGLContext::makeCurrent() const {
|
||||
}
|
||||
|
||||
void SkGLContext::swapBuffers() {
|
||||
this->onPlatformSwapBuffers();
|
||||
}
|
||||
|
||||
void SkGLContext::waitOnSyncOrSwap() {
|
||||
if (!fFenceSync) {
|
||||
// Fallback on the platform SwapBuffers method for synchronization. This may have no effect.
|
||||
this->onPlatformSwapBuffers();
|
||||
this->swapBuffers();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user