| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/gpu_browser_compositor_output_surface.h" | 5 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/output/output_surface_client.h" | 8 #include "cc/output/output_surface_client.h" |
| 9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" | 9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida
tor.h" |
| 10 #include "content/browser/compositor/reflector_impl.h" | 10 #include "content/browser/compositor/reflector_impl.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 #if defined(OS_MACOSX) | 99 #if defined(OS_MACOSX) |
| 100 if (should_show_frames_state_ == | 100 if (should_show_frames_state_ == |
| 101 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED) { | 101 SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED) { |
| 102 should_show_frames_state_ = SHOULD_SHOW_FRAMES; | 102 should_show_frames_state_ = SHOULD_SHOW_FRAMES; |
| 103 } | 103 } |
| 104 #endif | 104 #endif |
| 105 } | 105 } |
| 106 | 106 |
| 107 void GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted( | 107 void GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted( |
| 108 const std::vector<ui::LatencyInfo>& latency_info, | 108 const std::vector<ui::LatencyInfo>& latency_info) { |
| 109 gfx::SwapResult result) { | |
| 110 #if defined(OS_MACOSX) | 109 #if defined(OS_MACOSX) |
| 111 // On Mac, delay acknowledging the swap to the output surface client until | 110 // On Mac, delay acknowledging the swap to the output surface client until |
| 112 // it has been drawn, see OnSurfaceDisplayed(); | 111 // it has been drawn, see OnSurfaceDisplayed(); |
| 113 NOTREACHED(); | 112 NOTREACHED(); |
| 114 #else | 113 #else |
| 115 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 114 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); |
| 116 OnSwapBuffersComplete(); | 115 OnSwapBuffersComplete(); |
| 117 #endif | 116 #endif |
| 118 } | 117 } |
| 119 | 118 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 147 } | 146 } |
| 148 } | 147 } |
| 149 | 148 |
| 150 bool GpuBrowserCompositorOutputSurface:: | 149 bool GpuBrowserCompositorOutputSurface:: |
| 151 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { | 150 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { |
| 152 return should_show_frames_state_ != SHOULD_SHOW_FRAMES; | 151 return should_show_frames_state_ != SHOULD_SHOW_FRAMES; |
| 153 } | 152 } |
| 154 #endif | 153 #endif |
| 155 | 154 |
| 156 } // namespace content | 155 } // namespace content |
| OLD | NEW |