| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/renderer_host/image_transport_client.h" | 5 #include "content/browser/renderer_host/image_transport_client.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 #include <X11/extensions/Xcomposite.h> | 8 #include <X11/extensions/Xcomposite.h> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 return initialized; | 209 return initialized; |
| 210 } | 210 } |
| 211 | 211 |
| 212 ui::SharedResources* resources_; | 212 ui::SharedResources* resources_; |
| 213 XID pixmap_; | 213 XID pixmap_; |
| 214 XID glx_pixmap_; | 214 XID glx_pixmap_; |
| 215 GLuint texture_; | 215 GLuint texture_; |
| 216 static base::LazyInstance<GLXFBConfig> fbconfig_; | 216 static base::LazyInstance<GLXFBConfig> fbconfig_; |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 base::LazyInstance<GLXFBConfig> ImageTransportClientGLX::fbconfig_( | 219 base::LazyInstance<GLXFBConfig> ImageTransportClientGLX::fbconfig_ = |
| 220 base::LINKER_INITIALIZED); | 220 LAZY_INSTANCE_INITIALIZER; |
| 221 | 221 |
| 222 class ImageTransportClientOSMesa : public ImageTransportClient { | 222 class ImageTransportClientOSMesa : public ImageTransportClient { |
| 223 public: | 223 public: |
| 224 ImageTransportClientOSMesa(ui::SharedResources* resources, | 224 ImageTransportClientOSMesa(ui::SharedResources* resources, |
| 225 const gfx::Size& size) | 225 const gfx::Size& size) |
| 226 : resources_(resources), | 226 : resources_(resources), |
| 227 size_(size), | 227 size_(size), |
| 228 texture_(0) { | 228 texture_(0) { |
| 229 } | 229 } |
| 230 | 230 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 return new ImageTransportClientGLX(resources); | 282 return new ImageTransportClientGLX(resources); |
| 283 case gfx::kGLImplementationEGLGLES2: | 283 case gfx::kGLImplementationEGLGLES2: |
| 284 return new ImageTransportClientEGL(resources); | 284 return new ImageTransportClientEGL(resources); |
| 285 case gfx::kGLImplementationOSMesaGL: | 285 case gfx::kGLImplementationOSMesaGL: |
| 286 return new ImageTransportClientOSMesa(resources, size); | 286 return new ImageTransportClientOSMesa(resources, size); |
| 287 default: | 287 default: |
| 288 NOTREACHED(); | 288 NOTREACHED(); |
| 289 return NULL; | 289 return NULL; |
| 290 } | 290 } |
| 291 } | 291 } |
| OLD | NEW |