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

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

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix CrOS Created 9 years, 1 month 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) 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 return initialized; 207 return initialized;
208 } 208 }
209 209
210 ui::SharedResources* resources_; 210 ui::SharedResources* resources_;
211 XID pixmap_; 211 XID pixmap_;
212 XID glx_pixmap_; 212 XID glx_pixmap_;
213 GLuint texture_; 213 GLuint texture_;
214 static base::LazyInstance<GLXFBConfig> fbconfig_; 214 static base::LazyInstance<GLXFBConfig> fbconfig_;
215 }; 215 };
216 216
217 base::LazyInstance<GLXFBConfig> ImageTransportClientGLX::fbconfig_( 217 base::LazyInstance<GLXFBConfig> ImageTransportClientGLX::fbconfig_ =
218 base::LINKER_INITIALIZED); 218 LINKER_ZERO_INITIALIZED;
219 219
220 class ImageTransportClientOSMesa : public ImageTransportClient { 220 class ImageTransportClientOSMesa : public ImageTransportClient {
221 public: 221 public:
222 ImageTransportClientOSMesa(ui::SharedResources* resources, 222 ImageTransportClientOSMesa(ui::SharedResources* resources,
223 const gfx::Size& size) 223 const gfx::Size& size)
224 : resources_(resources), 224 : resources_(resources),
225 size_(size), 225 size_(size),
226 texture_(0) { 226 texture_(0) {
227 } 227 }
228 228
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return new ImageTransportClientGLX(resources); 280 return new ImageTransportClientGLX(resources);
281 case gfx::kGLImplementationEGLGLES2: 281 case gfx::kGLImplementationEGLGLES2:
282 return new ImageTransportClientEGL(resources); 282 return new ImageTransportClientEGL(resources);
283 case gfx::kGLImplementationOSMesaGL: 283 case gfx::kGLImplementationOSMesaGL:
284 return new ImageTransportClientOSMesa(resources, size); 284 return new ImageTransportClientOSMesa(resources, size);
285 default: 285 default:
286 NOTREACHED(); 286 NOTREACHED();
287 return NULL; 287 return NULL;
288 } 288 }
289 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698