OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/resources/sync_point_helper.h" | 5 #include "cc/resources/sync_point_helper.h" |
6 | 6 |
7 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 7 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
11 class SignalSyncPointCallbackClass | 11 class SignalSyncPointCallbackClass |
12 : public WebKit::WebGraphicsContext3D::WebGraphicsSyncPointCallback { | 12 : public WebKit::WebGraphicsContext3D::WebGraphicsSyncPointCallback { |
13 public: | 13 public: |
14 explicit SignalSyncPointCallbackClass(const base::Closure& closure) | 14 explicit SignalSyncPointCallbackClass(const base::Closure& closure) |
15 : closure_(closure) {} | 15 : closure_(closure) {} |
16 | 16 |
17 virtual void onSyncPointReached() { | 17 virtual void onSyncPointReached() { |
(...skipping 10 matching lines...) Expand all Loading... |
28 unsigned sync_point, | 28 unsigned sync_point, |
29 const base::Closure& closure) { | 29 const base::Closure& closure) { |
30 SignalSyncPointCallbackClass* callback_class = | 30 SignalSyncPointCallbackClass* callback_class = |
31 new SignalSyncPointCallbackClass(closure); | 31 new SignalSyncPointCallbackClass(closure); |
32 | 32 |
33 // Pass ownership of the CallbackClass to WebGraphicsContext3D. | 33 // Pass ownership of the CallbackClass to WebGraphicsContext3D. |
34 context3d->signalSyncPoint(sync_point, callback_class); | 34 context3d->signalSyncPoint(sync_point, callback_class); |
35 } | 35 } |
36 | 36 |
37 } // namespace cc | 37 } // namespace cc |
OLD | NEW |