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