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

Side by Side Diff: content/browser/renderer_host/image_transport_client_linux.cc

Issue 10009024: Remove WAYLAND port (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | skia/ext/canvas_paint.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void Update() { } 76 virtual void Update() { }
77 virtual TransportDIB::Handle Handle() const { 77 virtual TransportDIB::Handle Handle() const {
78 return TransportDIB::DefaultHandleValue(); 78 return TransportDIB::DefaultHandleValue();
79 } 79 }
80 80
81 private: 81 private:
82 ImageTransportFactory* factory_; 82 ImageTransportFactory* factory_;
83 EGLImageKHR image_; 83 EGLImageKHR image_;
84 }; 84 };
85 85
86 #if !defined(USE_WAYLAND)
87
88 class ImageTransportClientGLX : public ImageTransportClient { 86 class ImageTransportClientGLX : public ImageTransportClient {
89 public: 87 public:
90 ImageTransportClientGLX(ImageTransportFactory* factory, const gfx::Size& size) 88 ImageTransportClientGLX(ImageTransportFactory* factory, const gfx::Size& size)
91 : ImageTransportClient(false, size), 89 : ImageTransportClient(false, size),
92 factory_(factory), 90 factory_(factory),
93 pixmap_(0), 91 pixmap_(0),
94 glx_pixmap_(0), 92 glx_pixmap_(0),
95 acquired_(false) { 93 acquired_(false) {
96 } 94 }
97 95
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 280
283 virtual TransportDIB::Handle Handle() const { return shared_mem_->handle(); } 281 virtual TransportDIB::Handle Handle() const { return shared_mem_->handle(); }
284 282
285 private: 283 private:
286 ImageTransportFactory* factory_; 284 ImageTransportFactory* factory_;
287 scoped_ptr<TransportDIB> shared_mem_; 285 scoped_ptr<TransportDIB> shared_mem_;
288 static uint32 next_handle_; 286 static uint32 next_handle_;
289 }; 287 };
290 uint32 ImageTransportClientOSMesa::next_handle_ = 0; 288 uint32 ImageTransportClientOSMesa::next_handle_ = 0;
291 289
292 #endif // !USE_WAYLAND
293
294 } // anonymous namespace 290 } // anonymous namespace
295 291
296 ImageTransportClient* ImageTransportClient::Create( 292 ImageTransportClient* ImageTransportClient::Create(
297 ImageTransportFactory* factory, 293 ImageTransportFactory* factory,
298 const gfx::Size& size) { 294 const gfx::Size& size) {
299 switch (gfx::GetGLImplementation()) { 295 switch (gfx::GetGLImplementation()) {
300 #if !defined(USE_WAYLAND)
301 case gfx::kGLImplementationOSMesaGL: 296 case gfx::kGLImplementationOSMesaGL:
302 return new ImageTransportClientOSMesa(factory, size); 297 return new ImageTransportClientOSMesa(factory, size);
303 case gfx::kGLImplementationDesktopGL: 298 case gfx::kGLImplementationDesktopGL:
304 return new ImageTransportClientGLX(factory, size); 299 return new ImageTransportClientGLX(factory, size);
305 #endif
306 case gfx::kGLImplementationEGLGLES2: 300 case gfx::kGLImplementationEGLGLES2:
307 return new ImageTransportClientEGL(factory, size); 301 return new ImageTransportClientEGL(factory, size);
308 default: 302 default:
309 NOTREACHED(); 303 NOTREACHED();
310 return NULL; 304 return NULL;
311 } 305 }
312 } 306 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | skia/ext/canvas_paint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698