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

Side by Side Diff: gpu/command_buffer/service/x_utils.cc

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
« no previous file with comments | « gpu/command_buffer/service/x_utils.h ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 32
33 // This class implements the XWindowWrapper class. 33 // This class implements the XWindowWrapper class.
34 34
35 #include "gpu/command_buffer/service/precompile.h" 35 #include "gpu/command_buffer/service/precompile.h"
36 #include "gpu/command_buffer/common/logging.h" 36 #include "gpu/command_buffer/common/logging.h"
37 #include "gpu/command_buffer/service/x_utils.h" 37 #include "gpu/command_buffer/service/x_utils.h"
38 38
39 namespace command_buffer { 39 namespace gpu {
40 40
41 bool XWindowWrapper::Initialize() { 41 bool XWindowWrapper::Initialize() {
42 XWindowAttributes attributes; 42 XWindowAttributes attributes;
43 XGetWindowAttributes(display_, window_, &attributes); 43 XGetWindowAttributes(display_, window_, &attributes);
44 XVisualInfo visual_info_template; 44 XVisualInfo visual_info_template;
45 visual_info_template.visualid = XVisualIDFromVisual(attributes.visual); 45 visual_info_template.visualid = XVisualIDFromVisual(attributes.visual);
46 int visual_info_count = 0; 46 int visual_info_count = 0;
47 XVisualInfo *visual_info_list = XGetVisualInfo(display_, VisualIDMask, 47 XVisualInfo *visual_info_list = XGetVisualInfo(display_, VisualIDMask,
48 &visual_info_template, 48 &visual_info_template,
49 &visual_info_count); 49 &visual_info_count);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (context_) { 82 if (context_) {
83 glXDestroyContext(display_, context_); 83 glXDestroyContext(display_, context_);
84 context_ = 0; 84 context_ = 0;
85 } 85 }
86 } 86 }
87 87
88 void XWindowWrapper::SwapBuffers() { 88 void XWindowWrapper::SwapBuffers() {
89 glXSwapBuffers(display_, window_); 89 glXSwapBuffers(display_, window_);
90 } 90 }
91 91
92 } // namespace command_buffer 92 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/x_utils.h ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698