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

Unified Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 632113002: Remove unreachable code in child OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/compositor_output_surface.cc
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index dd3cabe005b5399eaf41bafe35d5d43520541f15..c579d8c402912d65ad030226c553016b0d31a0ad 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -134,7 +134,8 @@ void CompositorOutputSurface::ShortcutSwapAck(
}
void CompositorOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
- if (layout_test_mode_ && use_swap_compositor_frame_message_) {
+ DCHECK(use_swap_compositor_frame_message_);
+ if (layout_test_mode_) {
// This code path is here to support layout tests that are currently
// doing a readback in the renderer instead of the browser. So they
// are using deprecated code paths in the renderer and don't need to
@@ -164,9 +165,7 @@ void CompositorOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
}
client_->DidSwapBuffers();
return;
- }
-
- if (use_swap_compositor_frame_message_) {
+ } else {
{
ScopedVector<IPC::Message> messages;
std::vector<IPC::Message> messages_to_deliver_with_frame;
@@ -182,19 +181,7 @@ void CompositorOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
// ~send_message_scope.
}
client_->DidSwapBuffers();
- return;
}
-
- if (frame->gl_frame_data) {
- ContextProviderCommandBuffer* provider_command_buffer =
- static_cast<ContextProviderCommandBuffer*>(context_provider());
- CommandBufferProxyImpl* command_buffer_proxy =
- provider_command_buffer->GetCommandBufferProxy();
- DCHECK(command_buffer_proxy);
- command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info);
- }
-
- OutputSurface::SwapBuffers(frame);
}
void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698