• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2017 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef GrSemaphoreOp_DEFINED
9 #define GrSemaphoreOp_DEFINED
10 
11 #include "GrOp.h"
12 
13 #include "GrSemaphore.h"
14 #include "SkRefCnt.h"
15 
16 class GrSemaphoreOp : public GrOp {
17 public:
18     static std::unique_ptr<GrSemaphoreOp> MakeSignal(sk_sp<GrSemaphore> semaphore);
19 
20     static std::unique_ptr<GrSemaphoreOp> MakeWait(sk_sp<GrSemaphore> semaphore);
21 
22 protected:
GrSemaphoreOp(uint32_t classId,sk_sp<GrSemaphore> semaphore)23     GrSemaphoreOp(uint32_t classId, sk_sp<GrSemaphore> semaphore)
24         : INHERITED(classId), fSemaphore(std::move(semaphore)) {}
25 
26     sk_sp<GrSemaphore> fSemaphore;
27 
28 private:
onCombineIfPossible(GrOp * that,const GrCaps & caps)29     bool onCombineIfPossible(GrOp* that, const GrCaps& caps) override { return false; }
onPrepare(GrOpFlushState *)30     void onPrepare(GrOpFlushState*) override {}
31 
32     typedef GrOp INHERITED;
33 };
34 
35 #endif
36