1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_RESOURCES_SYNC_POINT_HELPER_H_
6 #define CC_RESOURCES_SYNC_POINT_HELPER_H_
8 #include "base/callback.h"
9 #include "cc/base/cc_export.h"
11 namespace WebKit
{ class WebGraphicsContext3D
; }
15 class CC_EXPORT SyncPointHelper
{
17 // Requests a callback to |closure| when the |sync_point| is reached by the
20 // If the |context3d| is destroyed or lost before the callback fires, then
21 // AbortBecauseDidLoseOrDestroyContext() must be called to clean up the
22 // callback's resources.
23 static void SignalSyncPoint(
24 WebKit::WebGraphicsContext3D
* context3d
,
26 const base::Closure
& closure
);
31 DISALLOW_COPY_AND_ASSIGN(SyncPointHelper
);
36 #endif // CC_RESOURCES_SYNC_POINT_HELPER_H_