| OLD | NEW |
| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 // The compositor context shares resources with the worker context unless | 782 // The compositor context shares resources with the worker context unless |
| 783 // the worker is async. | 783 // the worker is async. |
| 784 ContextProviderCommandBuffer* share_context = worker_context_provider.get(); | 784 ContextProviderCommandBuffer* share_context = worker_context_provider.get(); |
| 785 if (compositor_deps_->IsAsyncWorkerContextEnabled()) | 785 if (compositor_deps_->IsAsyncWorkerContextEnabled()) |
| 786 share_context = nullptr; | 786 share_context = nullptr; |
| 787 | 787 |
| 788 scoped_refptr<ContextProviderCommandBuffer> context_provider( | 788 scoped_refptr<ContextProviderCommandBuffer> context_provider( |
| 789 new ContextProviderCommandBuffer( | 789 new ContextProviderCommandBuffer( |
| 790 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, | 790 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
| 791 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, | 791 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
| 792 GetURLForGraphicsContext3D(), gfx::PreferIntegratedGpu, | 792 GetURLForGraphicsContext3D(), gl::PreferIntegratedGpu, |
| 793 automatic_flushes, support_locking, limits, attributes, share_context, | 793 automatic_flushes, support_locking, limits, attributes, share_context, |
| 794 command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT)); | 794 command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT)); |
| 795 | 795 |
| 796 #if defined(OS_ANDROID) | 796 #if defined(OS_ANDROID) |
| 797 if (RenderThreadImpl::current()->sync_compositor_message_filter()) { | 797 if (RenderThreadImpl::current()->sync_compositor_message_filter()) { |
| 798 return base::WrapUnique(new SynchronousCompositorOutputSurface( | 798 return base::WrapUnique(new SynchronousCompositorOutputSurface( |
| 799 context_provider, worker_context_provider, routing_id(), | 799 context_provider, worker_context_provider, routing_id(), |
| 800 output_surface_id, | 800 output_surface_id, |
| 801 RenderThreadImpl::current()->sync_compositor_message_filter(), | 801 RenderThreadImpl::current()->sync_compositor_message_filter(), |
| 802 frame_swap_message_queue_)); | 802 frame_swap_message_queue_)); |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 } | 2090 } |
| 2091 | 2091 |
| 2092 float RenderWidget::GetOriginalDeviceScaleFactor() const { | 2092 float RenderWidget::GetOriginalDeviceScaleFactor() const { |
| 2093 return | 2093 return |
| 2094 screen_metrics_emulator_ ? | 2094 screen_metrics_emulator_ ? |
| 2095 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : | 2095 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : |
| 2096 device_scale_factor_; | 2096 device_scale_factor_; |
| 2097 } | 2097 } |
| 2098 | 2098 |
| 2099 } // namespace content | 2099 } // namespace content |
| OLD | NEW |