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

Side by Side Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 2089753003: cc: Use the correct internal format for glCopyTexImage2D calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copytextureformat: comments Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698