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 | #include "src/gpu/gl/GrGLSemaphore.h" |
9 | |
10 | #include "src/gpu/gl/GrGLGpu.h" |
11 | |
12 | GrGLSemaphore::GrGLSemaphore(GrGLGpu* gpu, bool isOwned) |
13 | : fGpu(gpu), fSync(0), fIsOwned(isOwned) { |
14 | } |
15 | |
16 | GrGLSemaphore::~GrGLSemaphore() { |
17 | if (fSync && fIsOwned) { |
18 | fGpu->deleteSync(fSync); |
19 | } |
20 | } |
21 |