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

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

Issue 1960803002: Split the media context from the compositor worker context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: workerthread: streams Created 4 years, 7 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_thread_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('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 <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
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 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 } 2080 }
2081 2081
2082 float RenderWidget::GetOriginalDeviceScaleFactor() const { 2082 float RenderWidget::GetOriginalDeviceScaleFactor() const {
2083 return 2083 return
2084 screen_metrics_emulator_ ? 2084 screen_metrics_emulator_ ?
2085 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : 2085 screen_metrics_emulator_->original_screen_info().deviceScaleFactor :
2086 device_scale_factor_; 2086 device_scale_factor_;
2087 } 2087 }
2088 2088
2089 } // namespace content 2089 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698