aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLSemaphore.cpp
blob: c26b74e9c1b764ebc6faf7f2613727155163dc2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "GrGLSemaphore.h"

#include "GrGLGpu.h"

GrGLSemaphore::GrGLSemaphore(const GrGLGpu* gpu, bool isOwned)
    : INHERITED(gpu), fSync(0), fIsOwned(isOwned) {
}

GrGLSemaphore::~GrGLSemaphore() {
    if (fIsOwned && fGpu) {
        static_cast<const GrGLGpu*>(fGpu)->deleteSync(fSync);
    }
}