| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 client_->DidSwapBuffers(); | 85 client_->DidSwapBuffers(); |
| 86 | 86 |
| 87 #if defined(OS_MACOSX) | 87 #if defined(OS_MACOSX) |
| 88 if (should_not_show_frames_) | 88 if (should_not_show_frames_) |
| 89 should_not_show_frames_ = false; | 89 should_not_show_frames_ = false; |
| 90 #endif | 90 #endif |
| 91 } | 91 } |
| 92 | 92 |
| 93 void GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted( | 93 void GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted( |
| 94 const std::vector<ui::LatencyInfo>& latency_info) { | 94 const std::vector<ui::LatencyInfo>& latency_info, |
| 95 int result) { |
| 95 #if defined(OS_MACOSX) | 96 #if defined(OS_MACOSX) |
| 96 // On Mac, delay acknowledging the swap to the output surface client until | 97 // On Mac, delay acknowledging the swap to the output surface client until |
| 97 // it has been drawn, see OnSurfaceDisplayed(); | 98 // it has been drawn, see OnSurfaceDisplayed(); |
| 98 NOTREACHED(); | 99 NOTREACHED(); |
| 99 #else | 100 #else |
| 100 if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 101 if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
| 101 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 102 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); |
| 102 } else { | 103 } else { |
| 103 BrowserThread::PostTask( | 104 BrowserThread::PostTask( |
| 104 BrowserThread::UI, | 105 BrowserThread::UI, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 130 should_not_show_frames_ = true; | 131 should_not_show_frames_ = true; |
| 131 } | 132 } |
| 132 | 133 |
| 133 bool GpuBrowserCompositorOutputSurface::ShouldNotShowFramesAfterRecycle() | 134 bool GpuBrowserCompositorOutputSurface::ShouldNotShowFramesAfterRecycle() |
| 134 const { | 135 const { |
| 135 return should_not_show_frames_; | 136 return should_not_show_frames_; |
| 136 } | 137 } |
| 137 #endif | 138 #endif |
| 138 | 139 |
| 139 } // namespace content | 140 } // namespace content |
| OLD | NEW |