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 "ui/gfx/gl/gl_surface_wgl.h" | 5 #include "ui/gfx/gl/gl_surface_wgl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/gl/gl_bindings.h" | 9 #include "ui/gfx/gl/gl_bindings.h" |
10 | 10 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 g_display = wgl_display.release(); | 184 g_display = wgl_display.release(); |
185 initialized = true; | 185 initialized = true; |
186 return true; | 186 return true; |
187 } | 187 } |
188 | 188 |
189 HDC GLSurfaceWGL::GetDisplayDC() { | 189 HDC GLSurfaceWGL::GetDisplayDC() { |
190 return g_display->device_context(); | 190 return g_display->device_context(); |
191 } | 191 } |
192 | 192 |
193 NativeViewGLSurfaceWGL::NativeViewGLSurfaceWGL(gfx::PluginWindowHandle window) | 193 NativeViewGLSurfaceWGL::NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window) |
194 : window_(window), | 194 : window_(window), |
195 child_window_(NULL), | 195 child_window_(NULL), |
196 device_context_(NULL) { | 196 device_context_(NULL) { |
197 DCHECK(window); | 197 DCHECK(window); |
198 } | 198 } |
199 | 199 |
200 NativeViewGLSurfaceWGL::~NativeViewGLSurfaceWGL() { | 200 NativeViewGLSurfaceWGL::~NativeViewGLSurfaceWGL() { |
201 Destroy(); | 201 Destroy(); |
202 } | 202 } |
203 | 203 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 gfx::Size PbufferGLSurfaceWGL::GetSize() { | 358 gfx::Size PbufferGLSurfaceWGL::GetSize() { |
359 return size_; | 359 return size_; |
360 } | 360 } |
361 | 361 |
362 void* PbufferGLSurfaceWGL::GetHandle() { | 362 void* PbufferGLSurfaceWGL::GetHandle() { |
363 return device_context_; | 363 return device_context_; |
364 } | 364 } |
365 | 365 |
366 } // namespace gfx | 366 } // namespace gfx |
OLD | NEW |