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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1179653004: Remove non-impl-side painting as an option for blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removenoimplblink: . Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 54021112fa454236924c1d3eec2a3563a99bef90..ebd6fde3adbb969ad3feb16491ef4f5c1d53e4d8 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -575,11 +575,6 @@ void RenderThreadImpl::Init() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
- is_impl_side_painting_enabled_ =
- !command_line.HasSwitch(switches::kDisableImplSidePainting);
- cc_blink::WebLayerImpl::SetImplSidePaintingEnabled(
- is_impl_side_painting_enabled_);
-
cc::LayerSettings layer_settings;
if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines))
layer_settings.use_compositor_animation_timelines = true;
@@ -656,41 +651,37 @@ void RenderThreadImpl::Init() {
is_gather_pixel_refs_enabled_ = false;
- if (is_impl_side_painting_enabled_) {
- int num_raster_threads = 0;
- std::string string_value =
- command_line.GetSwitchValueASCII(switches::kNumRasterThreads);
- bool parsed_num_raster_threads =
- base::StringToInt(string_value, &num_raster_threads);
- DCHECK(parsed_num_raster_threads) << string_value;
- DCHECK_GT(num_raster_threads, 0);
-
- // Note: Currently, gathering of pixel refs when using a single
- // raster thread doesn't provide any benefit. This might change
- // in the future but we avoid it for now to reduce the cost of
- // Picture::Create.
- is_gather_pixel_refs_enabled_ = num_raster_threads > 1;
-
- base::SimpleThread::Options thread_options;
+ int num_raster_threads = 0;
+ std::string string_value =
+ command_line.GetSwitchValueASCII(switches::kNumRasterThreads);
+ bool parsed_num_raster_threads =
+ base::StringToInt(string_value, &num_raster_threads);
+ DCHECK(parsed_num_raster_threads) << string_value;
+ DCHECK_GT(num_raster_threads, 0);
+
+ // Note: Currently, gathering of pixel refs when using a single
+ // raster thread doesn't provide any benefit. This might change
+ // in the future but we avoid it for now to reduce the cost of
+ // Picture::Create.
+ is_gather_pixel_refs_enabled_ = num_raster_threads > 1;
+
+ base::SimpleThread::Options thread_options;
#if defined(OS_ANDROID) || defined(OS_LINUX)
- if (!command_line.HasSwitch(
- switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
- thread_options.set_priority(base::ThreadPriority::BACKGROUND);
- }
+ if (!command_line.HasSwitch(
+ switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
+ thread_options.set_priority(base::ThreadPriority::BACKGROUND);
+ }
#endif
- while (compositor_raster_threads_.size() <
- static_cast<size_t>(num_raster_threads)) {
- scoped_ptr<CompositorRasterThread> raster_thread(
- new CompositorRasterThread(
- compositor_task_graph_runner_.get(),
- base::StringPrintf(
- "CompositorTileWorker%u",
- static_cast<unsigned>(compositor_raster_threads_.size() + 1))
- .c_str(),
- thread_options));
- raster_thread->Start();
- compositor_raster_threads_.push_back(raster_thread.Pass());
- }
+ while (compositor_raster_threads_.size() <
+ static_cast<size_t>(num_raster_threads)) {
+ scoped_ptr<CompositorRasterThread> raster_thread(new CompositorRasterThread(
+ compositor_task_graph_runner_.get(),
+ base::StringPrintf("CompositorTileWorker%u",
+ static_cast<unsigned>(
+ compositor_raster_threads_.size() + 1)).c_str(),
+ thread_options));
+ raster_thread->Start();
+ compositor_raster_threads_.push_back(raster_thread.Pass());
}
// In single process, browser main loop set up the discardable memory
@@ -1120,12 +1111,6 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
cc_blink::SetSharedBitmapAllocationFunction(AllocateSharedBitmapFunction);
- // Limit use of the scaled image cache to when deferred image decoding is
- // enabled.
- if (!command_line.HasSwitch(switches::kEnableDeferredImageDecoding) &&
- !is_impl_side_painting_enabled_)
- SkGraphics::SetResourceCacheTotalByteLimit(0u);
-
SkGraphics::SetResourceCacheSingleAllocationByteLimit(
kImageCacheSingleAllocationByteLimit);
@@ -1391,10 +1376,6 @@ ServiceRegistry* RenderThreadImpl::GetServiceRegistry() {
return service_registry();
}
-bool RenderThreadImpl::IsImplSidePaintingEnabled() {
- return is_impl_side_painting_enabled_;
-}
-
bool RenderThreadImpl::IsGpuRasterizationForced() {
return is_gpu_rasterization_forced_;
}
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698