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

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

Issue 2106103005: Revert of Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 attributes.stencil_size = 0; 445 attributes.stencil_size = 0;
446 attributes.samples = 0; 446 attributes.samples = 0;
447 attributes.sample_buffers = 0; 447 attributes.sample_buffers = 0;
448 attributes.bind_generates_resource = false; 448 attributes.bind_generates_resource = false;
449 attributes.lose_context_when_out_of_memory = true; 449 attributes.lose_context_when_out_of_memory = true;
450 const bool automatic_flushes = false; 450 const bool automatic_flushes = false;
451 return make_scoped_refptr(new ContextProviderCommandBuffer( 451 return make_scoped_refptr(new ContextProviderCommandBuffer(
452 std::move(gpu_channel_host), stream_id, stream_priority, 452 std::move(gpu_channel_host), stream_id, stream_priority,
453 gpu::kNullSurfaceHandle, 453 gpu::kNullSurfaceHandle,
454 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext"), 454 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext"),
455 automatic_flushes, support_locking, limits, attributes, nullptr, type)); 455 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits,
456 attributes, nullptr, type));
456 } 457 }
457 458
458 } // namespace 459 } // namespace
459 460
460 // For measuring memory usage after each task. Behind a command line flag. 461 // For measuring memory usage after each task. Behind a command line flag.
461 class MemoryObserver : public base::MessageLoop::TaskObserver { 462 class MemoryObserver : public base::MessageLoop::TaskObserver {
462 public: 463 public:
463 MemoryObserver() {} 464 MemoryObserver() {}
464 ~MemoryObserver() override {} 465 ~MemoryObserver() override {}
465 466
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 // The compositor context shares resources with the worker context unless 1899 // The compositor context shares resources with the worker context unless
1899 // the worker is async. 1900 // the worker is async.
1900 ContextProviderCommandBuffer* share_context = worker_context_provider.get(); 1901 ContextProviderCommandBuffer* share_context = worker_context_provider.get();
1901 if (IsAsyncWorkerContextEnabled()) 1902 if (IsAsyncWorkerContextEnabled())
1902 share_context = nullptr; 1903 share_context = nullptr;
1903 1904
1904 scoped_refptr<ContextProviderCommandBuffer> context_provider( 1905 scoped_refptr<ContextProviderCommandBuffer> context_provider(
1905 new ContextProviderCommandBuffer( 1906 new ContextProviderCommandBuffer(
1906 gpu_channel_host, gpu::GPU_STREAM_DEFAULT, 1907 gpu_channel_host, gpu::GPU_STREAM_DEFAULT,
1907 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url, 1908 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url,
1908 automatic_flushes, support_locking, limits, attributes, share_context, 1909 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits,
1910 attributes, share_context,
1909 command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT)); 1911 command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT));
1910 1912
1911 if (layout_test_deps_) { 1913 if (layout_test_deps_) {
1912 return layout_test_deps_->CreateOutputSurface( 1914 return layout_test_deps_->CreateOutputSurface(
1913 std::move(gpu_channel_host), std::move(context_provider), 1915 std::move(gpu_channel_host), std::move(context_provider),
1914 std::move(worker_context_provider), this); 1916 std::move(worker_context_provider), this);
1915 } 1917 }
1916 1918
1917 #if defined(OS_ANDROID) 1919 #if defined(OS_ANDROID)
1918 if (sync_compositor_message_filter_) { 1920 if (sync_compositor_message_filter_) {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2228 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2227 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2229 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2228 2230
2229 blink::mainThreadIsolate()->MemoryPressureNotification( 2231 blink::mainThreadIsolate()->MemoryPressureNotification(
2230 v8_memory_pressure_level); 2232 v8_memory_pressure_level);
2231 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2233 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2232 v8_memory_pressure_level); 2234 v8_memory_pressure_level);
2233 } 2235 }
2234 2236
2235 } // namespace content 2237 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.cc ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698