| 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/reflector_impl.h" | 9 #include "content/browser/compositor/reflector_impl.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 NOTREACHED(); | 87 NOTREACHED(); |
| 88 #else | 88 #else |
| 89 if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 89 if (BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
| 90 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 90 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); |
| 91 } else { | 91 } else { |
| 92 BrowserThread::PostTask( | 92 BrowserThread::PostTask( |
| 93 BrowserThread::UI, | 93 BrowserThread::UI, |
| 94 FROM_HERE, | 94 FROM_HERE, |
| 95 base::Bind(&RenderWidgetHostImpl::CompositorFrameDrawn, latency_info)); | 95 base::Bind(&RenderWidgetHostImpl::CompositorFrameDrawn, latency_info)); |
| 96 } | 96 } |
| 97 cc::OutputSurface::OnSwapBuffersComplete(); | 97 OnSwapBuffersComplete(); |
| 98 #endif | 98 #endif |
| 99 } | 99 } |
| 100 | 100 |
| 101 #if defined(OS_MACOSX) | 101 #if defined(OS_MACOSX) |
| 102 void GpuBrowserCompositorOutputSurface::OnSurfaceDisplayed() { | 102 void GpuBrowserCompositorOutputSurface::OnSurfaceDisplayed() { |
| 103 cc::OutputSurface::OnSwapBuffersComplete(); | 103 cc::OutputSurface::OnSwapBuffersComplete(); |
| 104 } | 104 } |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 } // namespace content | 107 } // namespace content |
| OLD | NEW |