Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrGLSemaphore.h
Go to the documentation of this file.
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 GrGLSemaphore_DEFINED
9#define GrGLSemaphore_DEFINED
10
15
16#include <memory>
17
18class GrGLGpu;
19
20class GrGLSemaphore : public GrSemaphore {
21public:
22 static std::unique_ptr<GrGLSemaphore> Make(GrGLGpu* gpu, bool isOwned) {
23 return std::unique_ptr<GrGLSemaphore>(new GrGLSemaphore(gpu, isOwned));
24 }
25
26 ~GrGLSemaphore() override;
27
28 GrGLsync sync() const { return fSync; }
29 void setSync(const GrGLsync& sync) { fSync = sync; }
30
32 SK_ABORT("Unsupported");
33 }
34
35private:
36 GrGLSemaphore(GrGLGpu* gpu, bool isOwned);
37
38 void setIsOwned() override {
39 fIsOwned = true;
40 }
41
42 GrGLGpu* fGpu;
43 GrGLsync fSync;
44 bool fIsOwned;
45
46 using INHERITED = GrSemaphore;
47};
48
49#endif
struct __GLsync * GrGLsync
Definition GrGLTypes.h:129
#define SK_ABORT(message,...)
Definition SkAssert.h:70
~GrGLSemaphore() override
static std::unique_ptr< GrGLSemaphore > Make(GrGLGpu *gpu, bool isOwned)
GrGLsync sync() const
void setSync(const GrGLsync &sync)
void setIsOwned() override
GrBackendSemaphore backendSemaphore() const override