| 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 use_software = true; | 743 use_software = true; |
| 744 } | 744 } |
| 745 | 745 |
| 746 if (use_software) { | 746 if (use_software) { |
| 747 return base::WrapUnique(new DelegatedCompositorOutputSurface( | 747 return base::WrapUnique(new DelegatedCompositorOutputSurface( |
| 748 routing_id(), output_surface_id, nullptr, nullptr, nullptr, | 748 routing_id(), output_surface_id, nullptr, nullptr, nullptr, |
| 749 frame_swap_message_queue_)); | 749 frame_swap_message_queue_)); |
| 750 } | 750 } |
| 751 | 751 |
| 752 scoped_refptr<ContextProviderCommandBuffer> worker_context_provider = | 752 scoped_refptr<ContextProviderCommandBuffer> worker_context_provider = |
| 753 RenderThreadImpl::current()->SharedWorkerContextProvider(); | 753 RenderThreadImpl::current()->SharedCompositorWorkerContextProvider(); |
| 754 if (!worker_context_provider) { | 754 if (!worker_context_provider) { |
| 755 // Cause the compositor to wait and try again. | 755 // Cause the compositor to wait and try again. |
| 756 return nullptr; | 756 return nullptr; |
| 757 } | 757 } |
| 758 | 758 |
| 759 gpu::SharedMemoryLimits limits; | 759 gpu::SharedMemoryLimits limits; |
| 760 // The renderer compositor context doesn't do a lot of stuff, so we don't | 760 // The renderer compositor context doesn't do a lot of stuff, so we don't |
| 761 // expect it to need a lot of space for commands or transfer. Raster and | 761 // expect it to need a lot of space for commands or transfer. Raster and |
| 762 // uploads happen on the worker context instead. | 762 // uploads happen on the worker context instead. |
| 763 limits.command_buffer_size = 64 * 1024; | 763 limits.command_buffer_size = 64 * 1024; |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2074 } | 2074 } |
| 2075 | 2075 |
| 2076 float RenderWidget::GetOriginalDeviceScaleFactor() const { | 2076 float RenderWidget::GetOriginalDeviceScaleFactor() const { |
| 2077 return | 2077 return |
| 2078 screen_metrics_emulator_ ? | 2078 screen_metrics_emulator_ ? |
| 2079 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : | 2079 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : |
| 2080 device_scale_factor_; | 2080 device_scale_factor_; |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 } // namespace content | 2083 } // namespace content |
| OLD | NEW |