| 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 <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" | 
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 58       swap_buffers_completion_callback_.callback()); | 58       swap_buffers_completion_callback_.callback()); | 
| 59   GetCommandBufferProxy()->SetUpdateVSyncParametersCallback( | 59   GetCommandBufferProxy()->SetUpdateVSyncParametersCallback( | 
| 60       update_vsync_parameters_callback_.callback()); | 60       update_vsync_parameters_callback_.callback()); | 
| 61   if (capabilities_.uses_default_gl_framebuffer) { | 61   if (capabilities_.uses_default_gl_framebuffer) { | 
| 62     capabilities_.flipped_output_surface = | 62     capabilities_.flipped_output_surface = | 
| 63         context_provider()->ContextCapabilities().flips_vertically; | 63         context_provider()->ContextCapabilities().flips_vertically; | 
| 64   } | 64   } | 
| 65   return true; | 65   return true; | 
| 66 } | 66 } | 
| 67 | 67 | 
|  | 68 uint32_t GpuBrowserCompositorOutputSurface::GetFramebufferCopyTextureFormat() { | 
|  | 69   auto* gl = static_cast<ContextProviderCommandBuffer*>(context_provider()); | 
|  | 70   return gl->GetCopyTextureInternalFormat(); | 
|  | 71 } | 
|  | 72 | 
| 68 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() { | 73 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() { | 
| 69   if (!reflector_) { | 74   if (!reflector_) { | 
| 70     reflector_texture_.reset(); | 75     reflector_texture_.reset(); | 
| 71   } else { | 76   } else { | 
| 72     reflector_texture_.reset(new ReflectorTexture(context_provider())); | 77     reflector_texture_.reset(new ReflectorTexture(context_provider())); | 
| 73     reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox()); | 78     reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox()); | 
| 74   } | 79   } | 
| 75 } | 80 } | 
| 76 | 81 | 
| 77 void GpuBrowserCompositorOutputSurface::SwapBuffers( | 82 void GpuBrowserCompositorOutputSurface::SwapBuffers( | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 110   RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 115   RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); | 
| 111   OnSwapBuffersComplete(); | 116   OnSwapBuffersComplete(); | 
| 112 } | 117 } | 
| 113 | 118 | 
| 114 #if defined(OS_MACOSX) | 119 #if defined(OS_MACOSX) | 
| 115 void GpuBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( | 120 void GpuBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( | 
| 116     bool suspended) {} | 121     bool suspended) {} | 
| 117 #endif | 122 #endif | 
| 118 | 123 | 
| 119 }  // namespace content | 124 }  // namespace content | 
| OLD | NEW | 
|---|