4e8f567fa3
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610183002 Review URL: https://codereview.chromium.org/1610183002
30 lines
813 B
C++
30 lines
813 B
C++
|
|
/*
|
|
* Copyright 2015 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef SkGpuFenceSync_DEFINED
|
|
#define SkGpuFenceSync_DEFINED
|
|
|
|
#include "SkTypes.h"
|
|
|
|
typedef void* SkPlatformGpuFence;
|
|
|
|
/*
|
|
* This class provides an interface to interact with fence syncs. A fence sync is an object that the
|
|
* client can insert into the GPU command stream, and then at any future time, wait until all
|
|
* commands that were issued before the fence have completed.
|
|
*/
|
|
class SkGpuFenceSync {
|
|
public:
|
|
virtual SkPlatformGpuFence SK_WARN_UNUSED_RESULT insertFence() const = 0;
|
|
virtual bool waitFence(SkPlatformGpuFence, bool flush) const = 0;
|
|
virtual void deleteFence(SkPlatformGpuFence) const = 0;
|
|
|
|
virtual ~SkGpuFenceSync() {}
|
|
};
|
|
|
|
#endif
|