Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: cc/resources/sync_point_helper.cc

Issue 16831004: Perform glReadPixels with PBOs in the gpu, if PBOs are available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use webglid where approperiate Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/public/platform/WebGraphicsContext3D.h" 7 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 16 matching lines...) Expand all
27 WebKit::WebGraphicsContext3D* context3d, 27 WebKit::WebGraphicsContext3D* context3d,
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 void SyncPointHelper::SignalQuery(
38 WebKit::WebGraphicsContext3D* context3d,
39 WebKit::WebGLId query,
40 const base::Closure& closure) {
41 SignalSyncPointCallbackClass* callback_class =
42 new SignalSyncPointCallbackClass(closure);
43
44 // Pass ownership of the CallbackClass to WebGraphicsContext3D.
45 context3d->signalQuery(query, callback_class);
46 }
47
37 } // namespace cc 48 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698