| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 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/cross/logging.h" | 36 #include "gpu/command_buffer/common/logging.h" |
| 37 #include "gpu/command_buffer/service/linux/x_utils.h" | 37 #include "gpu/command_buffer/service/x_utils.h" |
| 38 | 38 |
| 39 namespace command_buffer { | 39 namespace command_buffer { |
| 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, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 command_buffer |
| OLD | NEW |