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

Side by Side Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 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 #include "content/browser/renderer_host/compositing_iosurface_mac.h" 5 #include "content/browser/renderer_host/compositing_iosurface_mac.h"
6 6
7 #include <OpenGL/CGLRenderers.h> 7 #include <OpenGL/CGLRenderers.h>
8 #include <OpenGL/OpenGL.h> 8 #include <OpenGL/OpenGL.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 490 }
491 491
492 if (!using_core_animation) { 492 if (!using_core_animation) {
493 CGLError cgl_error = CGLFlushDrawable(context_->cgl_context()); 493 CGLError cgl_error = CGLFlushDrawable(context_->cgl_context());
494 if (cgl_error != kCGLNoError) { 494 if (cgl_error != kCGLNoError) {
495 LOG(ERROR) << "CGLFlushDrawable error in DrawIOSurface: " << cgl_error; 495 LOG(ERROR) << "CGLFlushDrawable error in DrawIOSurface: " << cgl_error;
496 result = false; 496 result = false;
497 } 497 }
498 } 498 }
499 499
500 latency_info_.swap_timestamp = base::TimeTicks::HighResNow(); 500 latency_info_.Report(ui::INPUT_EVENT_LATENCY_FRAME_SWAP_COMPONENT);
501 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info_); 501 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info_);
502 latency_info_.Clear(); 502 latency_info_.Clear();
503 503
504 // Try to finish previous copy requests after flush to get better pipelining. 504 // Try to finish previous copy requests after flush to get better pipelining.
505 std::vector<base::Closure> copy_done_callbacks; 505 std::vector<base::Closure> copy_done_callbacks;
506 CheckIfAllCopiesAreFinishedWithinContext(false, &copy_done_callbacks); 506 CheckIfAllCopiesAreFinishedWithinContext(false, &copy_done_callbacks);
507 507
508 // Check if any of the drawing calls result in an error. 508 // Check if any of the drawing calls result in an error.
509 GetAndSaveGLError(); 509 GetAndSaveGLError();
510 if (gl_error_ != GL_NO_ERROR) { 510 if (gl_error_ != GL_NO_ERROR) {
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 } 1057 }
1058 1058
1059 GLenum CompositingIOSurfaceMac::GetAndSaveGLError() { 1059 GLenum CompositingIOSurfaceMac::GetAndSaveGLError() {
1060 GLenum gl_error = glGetError(); 1060 GLenum gl_error = glGetError();
1061 if (gl_error_ == GL_NO_ERROR) 1061 if (gl_error_ == GL_NO_ERROR)
1062 gl_error_ = gl_error; 1062 gl_error_ = gl_error;
1063 return gl_error; 1063 return gl_error;
1064 } 1064 }
1065 1065
1066 } // namespace content 1066 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698