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

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

Issue 1420503011: GLES2CmdDecoder should resize GLSurface using GLSurface::Resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/gl/gl_surface_osmesa.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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include "ui/gl/gl_surface_glx.h" 9 #include "ui/gl/gl_surface_glx.h"
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 uint32_t NativeViewGLSurfaceGLX::DispatchEvent(const ui::PlatformEvent& event) { 520 uint32_t NativeViewGLSurfaceGLX::DispatchEvent(const ui::PlatformEvent& event) {
521 XEvent forwarded_event = *event; 521 XEvent forwarded_event = *event;
522 forwarded_event.xexpose.window = parent_window_; 522 forwarded_event.xexpose.window = parent_window_;
523 XSendEvent(g_display, parent_window_, False, ExposureMask, 523 XSendEvent(g_display, parent_window_, False, ExposureMask,
524 &forwarded_event); 524 &forwarded_event);
525 XFlush(g_display); 525 XFlush(g_display);
526 return ui::POST_DISPATCH_STOP_PROPAGATION; 526 return ui::POST_DISPATCH_STOP_PROPAGATION;
527 } 527 }
528 528
529 bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size) { 529 bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size, float scale_factor) {
530 size_ = size; 530 size_ = size;
531 glXWaitGL(); 531 glXWaitGL();
532 XResizeWindow(g_display, window_, size.width(), size.height()); 532 XResizeWindow(g_display, window_, size.width(), size.height());
533 glXWaitX(); 533 glXWaitX();
534 return true; 534 return true;
535 } 535 }
536 536
537 bool NativeViewGLSurfaceGLX::IsOffscreen() { 537 bool NativeViewGLSurfaceGLX::IsOffscreen() {
538 return false; 538 return false;
539 } 539 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 if (!config_) 634 if (!config_)
635 config_ = GLSurfaceGLX::GetConfig(window_); 635 config_ = GLSurfaceGLX::GetConfig(window_);
636 return config_; 636 return config_;
637 } 637 }
638 638
639 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() { 639 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() {
640 Destroy(); 640 Destroy();
641 } 641 }
642 642
643 } // namespace gfx 643 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/gl/gl_surface_osmesa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698