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

Side by Side Diff: native_client_sdk/src/examples/fullscreen_tumbler/opengl_context.cc

Issue 13106002: [NaCl SDK] A bunch of spelling fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix presubmit Created 7 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 5
6 #include <pthread.h> 6 #include <pthread.h>
7 7
8 #include "ppapi/c/pp_graphics_3d.h" 8 #include "ppapi/c/pp_graphics_3d.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/gles2/gl2ext_ppapi.h" 10 #include "ppapi/gles2/gl2ext_ppapi.h"
11 #include "opengl_context.h" 11 #include "opengl_context.h"
12 12
13 namespace { 13 namespace {
14 // This is called by the brower when the 3D context has been flushed to the 14 // This is called by the browser when the 3D context has been flushed to the
15 // browser window. 15 // browser window.
16 void FlushCallback(void* data, int32_t result) { 16 void FlushCallback(void* data, int32_t result) {
17 static_cast<tumbler::OpenGLContext*>(data)->set_flush_pending(false); 17 static_cast<tumbler::OpenGLContext*>(data)->set_flush_pending(false);
18 } 18 }
19 } // namespace 19 } // namespace
20 20
21 namespace tumbler { 21 namespace tumbler {
22 22
23 OpenGLContext::OpenGLContext(pp::Instance* instance) 23 OpenGLContext::OpenGLContext(pp::Instance* instance)
24 : pp::Graphics3DClient(instance), 24 : pp::Graphics3DClient(instance),
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void OpenGLContext::FlushContext() { 77 void OpenGLContext::FlushContext() {
78 if (flush_pending()) { 78 if (flush_pending()) {
79 // A flush is pending so do nothing; just drop this flush on the floor. 79 // A flush is pending so do nothing; just drop this flush on the floor.
80 return; 80 return;
81 } 81 }
82 set_flush_pending(true); 82 set_flush_pending(true);
83 context_.SwapBuffers(pp::CompletionCallback(&FlushCallback, this)); 83 context_.SwapBuffers(pp::CompletionCallback(&FlushCallback, this));
84 } 84 }
85 } // namespace tumbler 85 } // namespace tumbler
86 86
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698