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

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

Issue 2702403009: Make surface GetFormat pure virtual, add missing overrides. (Closed)
Patch Set: Fix class name for Windows Created 3 years, 10 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_glx.h ('k') | ui/gl/gl_surface_stub.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 "ui/gl/gl_surface_glx.h" 5 #include "ui/gl/gl_surface_glx.h"
6 6
7 extern "C" { 7 extern "C" {
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 } 9 }
10 #include <memory> 10 #include <memory>
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 bool NativeViewGLSurfaceGLX::SupportsPostSubBuffer() { 609 bool NativeViewGLSurfaceGLX::SupportsPostSubBuffer() {
610 return g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer; 610 return g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer;
611 } 611 }
612 612
613 void* NativeViewGLSurfaceGLX::GetConfig() { 613 void* NativeViewGLSurfaceGLX::GetConfig() {
614 if (!config_) 614 if (!config_)
615 config_ = GetConfigForWindow(g_display, window_); 615 config_ = GetConfigForWindow(g_display, window_);
616 return config_; 616 return config_;
617 } 617 }
618 618
619 GLSurfaceFormat NativeViewGLSurfaceGLX::GetFormat() {
620 return GLSurfaceFormat();
621 }
622
619 unsigned long NativeViewGLSurfaceGLX::GetCompatibilityKey() { 623 unsigned long NativeViewGLSurfaceGLX::GetCompatibilityKey() {
620 return visual_id_; 624 return visual_id_;
621 } 625 }
622 626
623 gfx::SwapResult NativeViewGLSurfaceGLX::PostSubBuffer(int x, 627 gfx::SwapResult NativeViewGLSurfaceGLX::PostSubBuffer(int x,
624 int y, 628 int y,
625 int width, 629 int width,
626 int height) { 630 int height) {
627 DCHECK(g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer); 631 DCHECK(g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer);
628 glXCopySubBufferMESA(g_display, GetDrawableHandle(), x, y, width, height); 632 glXCopySubBufferMESA(g_display, GetDrawableHandle(), x, y, width, height);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 void* UnmappedNativeViewGLSurfaceGLX::GetHandle() { 706 void* UnmappedNativeViewGLSurfaceGLX::GetHandle() {
703 return reinterpret_cast<void*>(glx_window_); 707 return reinterpret_cast<void*>(glx_window_);
704 } 708 }
705 709
706 void* UnmappedNativeViewGLSurfaceGLX::GetConfig() { 710 void* UnmappedNativeViewGLSurfaceGLX::GetConfig() {
707 if (!config_) 711 if (!config_)
708 config_ = GetConfigForWindow(g_display, window_); 712 config_ = GetConfigForWindow(g_display, window_);
709 return config_; 713 return config_;
710 } 714 }
711 715
716 GLSurfaceFormat UnmappedNativeViewGLSurfaceGLX::GetFormat() {
717 return GLSurfaceFormat();
718 }
719
712 unsigned long UnmappedNativeViewGLSurfaceGLX::GetCompatibilityKey() { 720 unsigned long UnmappedNativeViewGLSurfaceGLX::GetCompatibilityKey() {
713 return XVisualIDFromVisual(g_visual); 721 return XVisualIDFromVisual(g_visual);
714 } 722 }
715 723
716 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() { 724 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() {
717 Destroy(); 725 Destroy();
718 } 726 }
719 727
720 } // namespace gl 728 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/gl/gl_surface_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698