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

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

Issue 137823002: GPU: Add trace for real SwapBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 #endif 593 #endif
594 size_ = size; 594 size_ = size;
595 return true; 595 return true;
596 } 596 }
597 597
598 bool NativeViewGLSurfaceGLX::IsOffscreen() { 598 bool NativeViewGLSurfaceGLX::IsOffscreen() {
599 return false; 599 return false;
600 } 600 }
601 601
602 bool NativeViewGLSurfaceGLX::SwapBuffers() { 602 bool NativeViewGLSurfaceGLX::SwapBuffers() {
603 TRACE_EVENT2("gpu", "NativeViewGLSurfaceGLX:RealSwapBuffers",
604 "width", GetSize().width(),
605 "height", GetSize().height());
606
603 glXSwapBuffers(g_display, GetDrawableHandle()); 607 glXSwapBuffers(g_display, GetDrawableHandle());
604 return true; 608 return true;
605 } 609 }
606 610
607 gfx::Size NativeViewGLSurfaceGLX::GetSize() { 611 gfx::Size NativeViewGLSurfaceGLX::GetSize() {
608 return size_; 612 return size_;
609 } 613 }
610 614
611 void* NativeViewGLSurfaceGLX::GetHandle() { 615 void* NativeViewGLSurfaceGLX::GetHandle() {
612 return reinterpret_cast<void*>(GetDrawableHandle()); 616 return reinterpret_cast<void*>(GetDrawableHandle());
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 795
792 void* PbufferGLSurfaceGLX::GetConfig() { 796 void* PbufferGLSurfaceGLX::GetConfig() {
793 return config_; 797 return config_;
794 } 798 }
795 799
796 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 800 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
797 Destroy(); 801 Destroy();
798 } 802 }
799 803
800 } // namespace gfx 804 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698