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

Side by Side Diff: ui/gl/gl_surface_wgl.cc

Issue 2702403009: Make surface GetFormat pure virtual, add missing overrides. (Closed)
Patch Set: Fix class name for Windows Created 3 years, 9 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
« no previous file with comments | « ui/gl/gl_surface_wgl.h ('k') | ui/gl/init/gl_factory_mac.cc » ('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 "ui/gl/gl_surface_wgl.h" 5 #include "ui/gl/gl_surface_wgl.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 RECT rect; 313 RECT rect;
314 BOOL result = GetClientRect(child_window_, &rect); 314 BOOL result = GetClientRect(child_window_, &rect);
315 DCHECK(result); 315 DCHECK(result);
316 return gfx::Size(rect.right - rect.left, rect.bottom - rect.top); 316 return gfx::Size(rect.right - rect.left, rect.bottom - rect.top);
317 } 317 }
318 318
319 void* NativeViewGLSurfaceWGL::GetHandle() { 319 void* NativeViewGLSurfaceWGL::GetHandle() {
320 return device_context_; 320 return device_context_;
321 } 321 }
322 322
323 GLSurfaceFormat NativeViewGLSurfaceWGL::GetFormat() {
324 return GLSurfaceFormat();
325 }
326
323 PbufferGLSurfaceWGL::PbufferGLSurfaceWGL(const gfx::Size& size) 327 PbufferGLSurfaceWGL::PbufferGLSurfaceWGL(const gfx::Size& size)
324 : size_(size), 328 : size_(size),
325 device_context_(NULL), 329 device_context_(NULL),
326 pbuffer_(NULL) { 330 pbuffer_(NULL) {
327 // Some implementations of Pbuffer do not support having a 0 size. For such 331 // Some implementations of Pbuffer do not support having a 0 size. For such
328 // cases use a (1, 1) surface. 332 // cases use a (1, 1) surface.
329 if (size_.GetArea() == 0) 333 if (size_.GetArea() == 0)
330 size_.SetSize(1, 1); 334 size_.SetSize(1, 1);
331 } 335 }
332 336
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 391 }
388 392
389 gfx::Size PbufferGLSurfaceWGL::GetSize() { 393 gfx::Size PbufferGLSurfaceWGL::GetSize() {
390 return size_; 394 return size_;
391 } 395 }
392 396
393 void* PbufferGLSurfaceWGL::GetHandle() { 397 void* PbufferGLSurfaceWGL::GetHandle() {
394 return device_context_; 398 return device_context_;
395 } 399 }
396 400
401 GLSurfaceFormat PbufferGLSurfaceWGL::GetFormat() {
402 return GLSurfaceFormat();
403 }
404
397 } // namespace gl 405 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_wgl.h ('k') | ui/gl/init/gl_factory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698