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

Unified Diff: gpu/ipc/service/image_transport_surface_overlay_mac.mm

Issue 2241003002: Mac: Loosen CoreAnimation blacklist on 10.10 and histograms to watch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix var name Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/config/gpu_driver_bug_list_json.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/image_transport_surface_overlay_mac.mm
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
index 6a64526a4fd35d4575c30458b07ad07e47ef2809..e8abb3298340d08716617bf0b2f71c7deb9d37ce 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -22,6 +22,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/metrics/histogram_macros.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "gpu/ipc/common/gpu_messages.h"
@@ -182,6 +183,9 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
const gfx::Rect& pixel_damage_rect) {
TRACE_EVENT0("gpu", "ImageTransportSurfaceOverlayMac::SwapBuffersInternal");
+ base::TimeTicks before_flush_time;
+ base::TimeTicks after_flush_before_commit_time;
+
// If supported, use GLFence to ensure that we haven't gotten more than one
// frame ahead of GL.
if (gl::GLFence::IsSupported()) {
@@ -215,6 +219,8 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
}
}
+ before_flush_time = base::TimeTicks::Now();
+
// Create a fence for the current frame's work and save the context.
previous_frame_fence_.reset(gl::GLFence::Create());
fence_context_obj_.reset(CGLGetCurrentContext(),
@@ -222,8 +228,11 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
// A glFlush is necessary to ensure correct content appears.
glFlush();
-
CheckGLErrors("After fence/flush");
+
+ after_flush_before_commit_time = base::TimeTicks::Now();
+ UMA_HISTOGRAM_TIMES("GPU.IOSurface.GLFlushTime",
+ after_flush_before_commit_time - before_flush_time);
} else {
// GLFence isn't supported - issue a glFinish on each frame to ensure
// there is backpressure from GL.
@@ -232,23 +241,25 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
CheckGLErrors("Before finish");
glFinish();
CheckGLErrors("After finish");
+ after_flush_before_commit_time = base::TimeTicks::Now();
}
- base::TimeTicks finish_time = base::TimeTicks::Now();
-
bool fullscreen_low_power_layer_valid = false;
ca_layer_tree_coordinator_->CommitPendingTreesToCA(
pixel_damage_rect, &fullscreen_low_power_layer_valid);
- // TODO(ccameron): Plumb the fullscreen low power layer through to the
- // appropriate window.
+
+ base::TimeTicks after_transaction_time = base::TimeTicks::Now();
+ UMA_HISTOGRAM_TIMES("GPU.IOSurface.CATransactionTime",
+ after_transaction_time - after_flush_before_commit_time);
// Update the latency info to reflect the swap time.
for (auto& latency_info : latency_info_) {
latency_info.AddLatencyNumberWithTimestamp(
- ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, finish_time, 1);
+ ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0,
+ after_flush_before_commit_time, 1);
latency_info.AddLatencyNumberWithTimestamp(
ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
- finish_time, 1);
+ after_flush_before_commit_time, 1);
}
// Send acknowledgement to the browser.
« no previous file with comments | « gpu/config/gpu_driver_bug_list_json.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698