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

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

Issue 2878163002: Fix bug whereby OnGpuSwitched was never called (Closed)
Patch Set: Add missed file Created 3 years, 7 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_info.cc ('k') | no next file » | 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 07e52b65bd80a346e44e9930c73e5a4ef7d2b64c..1c75718e5a7d4830ecc10c27936cd5c7b3b68c49 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -190,7 +190,7 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
// If we have gotten more than one frame ahead of GL, wait for the previous
// frame to complete.
if (previous_frame_fence_) {
- TRACE_EVENT0("gpu", "ImageTransportSurfaceOverlayMac::ClientWait");
+ TRACE_EVENT0("gpu", "ClientWait");
// Ensure we are using the context with which the fence was created.
gl::ScopedCGLSetCurrentContext scoped_set_current(fence_context_obj_);
@@ -222,8 +222,11 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
base::scoped_policy::RETAIN);
// A glFlush is necessary to ensure correct content appears.
- glFlush();
- CheckGLErrors("After fence/flush");
+ {
+ TRACE_EVENT0("gpu", "glFlush");
+ glFlush();
+ CheckGLErrors("After fence/flush");
+ }
after_flush_before_commit_time = base::TimeTicks::Now();
UMA_HISTOGRAM_TIMES("GPU.IOSurface.GLFlushTime",
@@ -231,7 +234,7 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
} else {
// GLFence isn't supported - issue a glFinish on each frame to ensure
// there is backpressure from GL.
- TRACE_EVENT0("gpu", "ImageTransportSurfaceOverlayMac::glFinish");
+ TRACE_EVENT0("gpu", "glFinish");
CheckGLErrors("Before finish");
glFinish();
CheckGLErrors("After finish");
@@ -239,8 +242,11 @@ void IOSurfaceContextNoOp(scoped_refptr<ui::IOSurfaceContext>) {
}
bool fullscreen_low_power_layer_valid = false;
- ca_layer_tree_coordinator_->CommitPendingTreesToCA(
- pixel_damage_rect, &fullscreen_low_power_layer_valid);
+ {
+ TRACE_EVENT0("gpu", "CommitPendingTreesToCA");
+ ca_layer_tree_coordinator_->CommitPendingTreesToCA(
+ pixel_damage_rect, &fullscreen_low_power_layer_valid);
+ }
base::TimeTicks after_transaction_time = base::TimeTicks::Now();
UMA_HISTOGRAM_TIMES("GPU.IOSurface.CATransactionTime",
« no previous file with comments | « gpu/config/gpu_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698