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

Side by Side Diff: content/renderer/render_widget.cc

Issue 1827123002: Move content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 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/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen_pepper.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 712
713 #if defined(MOJO_SHELL_CLIENT) 713 #if defined(MOJO_SHELL_CLIENT)
714 if (MojoShellConnection::Get() && !use_software && 714 if (MojoShellConnection::Get() && !use_software &&
715 command_line.HasSwitch(switches::kUseMusInRenderer)) { 715 command_line.HasSwitch(switches::kUseMusInRenderer)) {
716 RenderWidgetMusConnection* connection = 716 RenderWidgetMusConnection* connection =
717 RenderWidgetMusConnection::GetOrCreate(routing_id()); 717 RenderWidgetMusConnection::GetOrCreate(routing_id());
718 return connection->CreateOutputSurface(); 718 return connection->CreateOutputSurface();
719 } 719 }
720 #endif 720 #endif
721 721
722 scoped_refptr<GpuChannelHost> gpu_channel_host; 722 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host;
723 if (!use_software) { 723 if (!use_software) {
724 CauseForGpuLaunch cause = 724 CauseForGpuLaunch cause =
725 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; 725 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE;
726 gpu_channel_host = 726 gpu_channel_host =
727 RenderThreadImpl::current()->EstablishGpuChannelSync(cause); 727 RenderThreadImpl::current()->EstablishGpuChannelSync(cause);
728 if (!gpu_channel_host.get()) { 728 if (!gpu_channel_host.get()) {
729 // Cause the compositor to wait and try again. 729 // Cause the compositor to wait and try again.
730 return nullptr; 730 return nullptr;
731 } 731 }
732 // We may get a valid channel, but with a software renderer. In that case, 732 // We may get a valid channel, but with a software renderer. In that case,
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 } 2055 }
2056 2056
2057 void RenderWidget::didUpdateTextOfFocusedElementByNonUserInput() { 2057 void RenderWidget::didUpdateTextOfFocusedElementByNonUserInput() {
2058 #if defined(OS_ANDROID) 2058 #if defined(OS_ANDROID)
2059 if (!IsUsingImeThread()) 2059 if (!IsUsingImeThread())
2060 text_field_is_dirty_ = true; 2060 text_field_is_dirty_ = true;
2061 #endif 2061 #endif
2062 } 2062 }
2063 2063
2064 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 2064 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
2065 RenderWidget::CreateGraphicsContext3D(GpuChannelHost* gpu_channel_host) { 2065 RenderWidget::CreateGraphicsContext3D(gpu::GpuChannelHost* gpu_channel_host) {
2066 // This is for an offscreen context for raster in the compositor. So the 2066 // This is for an offscreen context for raster in the compositor. So the
2067 // default framebuffer doesn't need alpha, depth, stencil, antialiasing. 2067 // default framebuffer doesn't need alpha, depth, stencil, antialiasing.
2068 gpu::gles2::ContextCreationAttribHelper attributes; 2068 gpu::gles2::ContextCreationAttribHelper attributes;
2069 attributes.alpha_size = -1; 2069 attributes.alpha_size = -1;
2070 attributes.depth_size = 0; 2070 attributes.depth_size = 0;
2071 attributes.stencil_size = 0; 2071 attributes.stencil_size = 0;
2072 attributes.samples = 0; 2072 attributes.samples = 0;
2073 attributes.sample_buffers = 0; 2073 attributes.sample_buffers = 0;
2074 attributes.bind_generates_resource = false; 2074 attributes.bind_generates_resource = false;
2075 attributes.lose_context_when_out_of_memory = true; 2075 attributes.lose_context_when_out_of_memory = true;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 } 2149 }
2150 2150
2151 float RenderWidget::GetOriginalDeviceScaleFactor() const { 2151 float RenderWidget::GetOriginalDeviceScaleFactor() const {
2152 return 2152 return
2153 screen_metrics_emulator_ ? 2153 screen_metrics_emulator_ ?
2154 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : 2154 screen_metrics_emulator_->original_screen_info().deviceScaleFactor :
2155 device_scale_factor_; 2155 device_scale_factor_;
2156 } 2156 }
2157 2157
2158 } // namespace content 2158 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698