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

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

Issue 564903002: Merge GpuCommandBufferMsg_SetLatencyInfo into GpuCommandBufferMsg_AsyncFlush (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ShallowFlushCHROMIUM() in CompositorOutputSurface::SwapBuffers Created 6 years, 3 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
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "content/browser/compositor/reflector_impl.h" 8 #include "content/browser/compositor/reflector_impl.h"
9 #include "content/common/gpu/client/context_provider_command_buffer.h" 9 #include "content/common/gpu/client/context_provider_command_buffer.h"
10 #include "gpu/command_buffer/client/gles2_interface.h" 10 #include "gpu/command_buffer/client/gles2_interface.h"
(...skipping 17 matching lines...) Expand all
28 28
29 void GpuBrowserCompositorOutputSurface::SwapBuffers( 29 void GpuBrowserCompositorOutputSurface::SwapBuffers(
30 cc::CompositorFrame* frame) { 30 cc::CompositorFrame* frame) {
31 DCHECK(frame->gl_frame_data); 31 DCHECK(frame->gl_frame_data);
32 32
33 ContextProviderCommandBuffer* provider_command_buffer = 33 ContextProviderCommandBuffer* provider_command_buffer =
34 static_cast<ContextProviderCommandBuffer*>(context_provider_.get()); 34 static_cast<ContextProviderCommandBuffer*>(context_provider_.get());
35 CommandBufferProxyImpl* command_buffer_proxy = 35 CommandBufferProxyImpl* command_buffer_proxy =
36 provider_command_buffer->GetCommandBufferProxy(); 36 provider_command_buffer->GetCommandBufferProxy();
37 DCHECK(command_buffer_proxy); 37 DCHECK(command_buffer_proxy);
38 context_provider_->ContextGL()->ShallowFlushCHROMIUM();
39 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info); 38 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info);
40 39
41 if (reflector_.get()) { 40 if (reflector_.get()) {
42 if (frame->gl_frame_data->sub_buffer_rect == 41 if (frame->gl_frame_data->sub_buffer_rect ==
43 gfx::Rect(frame->gl_frame_data->size)) 42 gfx::Rect(frame->gl_frame_data->size))
44 reflector_->OnSwapBuffers(); 43 reflector_->OnSwapBuffers();
45 else 44 else
46 reflector_->OnPostSubBuffer(frame->gl_frame_data->sub_buffer_rect); 45 reflector_->OnPostSubBuffer(frame->gl_frame_data->sub_buffer_rect);
47 } 46 }
48 47
49 OutputSurface::SwapBuffers(frame); 48 OutputSurface::SwapBuffers(frame);
50 } 49 }
51 50
52 } // namespace content 51 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698