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

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

Issue 1903973004: (Reland) content: Enable image decode tasks on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | 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_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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); 830 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this))));
831 831
832 int num_raster_threads = 0; 832 int num_raster_threads = 0;
833 std::string string_value = 833 std::string string_value =
834 command_line.GetSwitchValueASCII(switches::kNumRasterThreads); 834 command_line.GetSwitchValueASCII(switches::kNumRasterThreads);
835 bool parsed_num_raster_threads = 835 bool parsed_num_raster_threads =
836 base::StringToInt(string_value, &num_raster_threads); 836 base::StringToInt(string_value, &num_raster_threads);
837 DCHECK(parsed_num_raster_threads) << string_value; 837 DCHECK(parsed_num_raster_threads) << string_value;
838 DCHECK_GT(num_raster_threads, 0); 838 DCHECK_GT(num_raster_threads, 0);
839 839
840 #if defined(OS_ANDROID) 840 // TODO(vmpstr): If the flag sticks, we should clean it up and always have
841 // Note: Currently, enabling image decode tasks only provides a benefit if 841 // image decode tasks.
842 // we use high quality interpolation filters, which are disabled on android.
843 are_image_decode_tasks_enabled_ = false;
844 #else
845 are_image_decode_tasks_enabled_ = true; 842 are_image_decode_tasks_enabled_ = true;
846 #endif
847 843
848 raster_worker_pool_->Start(num_raster_threads); 844 raster_worker_pool_->Start(num_raster_threads);
849 845
850 // TODO(boliu): In single process, browser main loop should set up the 846 // TODO(boliu): In single process, browser main loop should set up the
851 // discardable memory manager, and should skip this if kSingleProcess. 847 // discardable memory manager, and should skip this if kSingleProcess.
852 // See crbug.com/503724. 848 // See crbug.com/503724.
853 base::DiscardableMemoryAllocator::SetInstance( 849 base::DiscardableMemoryAllocator::SetInstance(
854 ChildThreadImpl::discardable_shared_memory_manager()); 850 ChildThreadImpl::discardable_shared_memory_manager());
855 851
856 service_registry()->AddService(base::Bind(CreateRenderFrameSetup)); 852 service_registry()->AddService(base::Bind(CreateRenderFrameSetup));
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 } 2111 }
2116 2112
2117 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2113 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2118 size_t erased = 2114 size_t erased =
2119 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2115 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2120 routing_id_); 2116 routing_id_);
2121 DCHECK_EQ(1u, erased); 2117 DCHECK_EQ(1u, erased);
2122 } 2118 }
2123 2119
2124 } // namespace content 2120 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698