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

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

Issue 2771053003: WIP: Plumbing input event latency reporting through Mus GPU.
Patch Set: NON_EXPORTED_BASE Created 3 years, 8 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 | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/DEPS » ('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 <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 bool has_alpha, 98 bool has_alpha,
99 bool use_stencil) { 99 bool use_stencil) {
100 size_ = size; 100 size_ = size;
101 has_set_draw_rectangle_since_last_resize_ = false; 101 has_set_draw_rectangle_since_last_resize_ = false;
102 context_provider()->ContextGL()->ResizeCHROMIUM( 102 context_provider()->ContextGL()->ResizeCHROMIUM(
103 size.width(), size.height(), device_scale_factor, has_alpha); 103 size.width(), size.height(), device_scale_factor, has_alpha);
104 } 104 }
105 105
106 void GpuBrowserCompositorOutputSurface::SwapBuffers( 106 void GpuBrowserCompositorOutputSurface::SwapBuffers(
107 cc::OutputSurfaceFrame frame) { 107 cc::OutputSurfaceFrame frame) {
108 GetCommandBufferProxy()->SetLatencyInfo(frame.latency_info); 108 GetCommandBufferProxy()->AddLatencyInfo(frame.latency_info);
109 109
110 gfx::Size surface_size = frame.size; 110 gfx::Size surface_size = frame.size;
111 if (reflector_) { 111 if (reflector_) {
112 if (frame.sub_buffer_rect && reflector_texture_defined_) { 112 if (frame.sub_buffer_rect && reflector_texture_defined_) {
113 reflector_texture_->CopyTextureSubImage(*frame.sub_buffer_rect); 113 reflector_texture_->CopyTextureSubImage(*frame.sub_buffer_rect);
114 reflector_->OnSourcePostSubBuffer(*frame.sub_buffer_rect, surface_size); 114 reflector_->OnSourcePostSubBuffer(*frame.sub_buffer_rect, surface_size);
115 } else { 115 } else {
116 reflector_texture_->CopyTextureFullImage(surface_size); 116 reflector_texture_->CopyTextureFullImage(surface_size);
117 reflector_->OnSourceSwapBuffers(surface_size); 117 reflector_->OnSourceSwapBuffers(surface_size);
118 reflector_texture_defined_ = true; 118 reflector_texture_defined_ = true;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 GpuBrowserCompositorOutputSurface::GetCommandBufferProxy() { 171 GpuBrowserCompositorOutputSurface::GetCommandBufferProxy() {
172 ui::ContextProviderCommandBuffer* provider_command_buffer = 172 ui::ContextProviderCommandBuffer* provider_command_buffer =
173 static_cast<ui::ContextProviderCommandBuffer*>(context_provider_.get()); 173 static_cast<ui::ContextProviderCommandBuffer*>(context_provider_.get());
174 gpu::CommandBufferProxyImpl* command_buffer_proxy = 174 gpu::CommandBufferProxyImpl* command_buffer_proxy =
175 provider_command_buffer->GetCommandBufferProxy(); 175 provider_command_buffer->GetCommandBufferProxy();
176 DCHECK(command_buffer_proxy); 176 DCHECK(command_buffer_proxy);
177 return command_buffer_proxy; 177 return command_buffer_proxy;
178 } 178 }
179 179
180 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698