Commit b27cbe91 authored by reveman@chromium.org's avatar reveman@chromium.org

content: Enable SkScaledImageCache on Android.

This should be safe to use now that our ashmem implementation
of discardable memory handles high memory usage properly.

BUG=330041
TBR=jamesr

Review URL: https://codereview.chromium.org/261663004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274490 0039d316-1c4b-4281-b951-d872f2087c98
parent 98de166d
...@@ -809,17 +809,10 @@ void RenderThreadImpl::EnsureWebKitInitialized() { ...@@ -809,17 +809,10 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
webkit::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction); webkit::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction);
// Limit use of the scaled image cache to when deferred image decoding // Limit use of the scaled image cache to when deferred image decoding is
// is enabled. // enabled.
// TODO(reveman): Allow use of this cache on Android once if (!command_line.HasSwitch(switches::kEnableDeferredImageDecoding) &&
// SkDiscardablePixelRef is used for decoded images. crbug.com/330041 !is_impl_side_painting_enabled_)
bool use_skia_scaled_image_cache = false;
#if !defined(OS_ANDROID)
use_skia_scaled_image_cache =
command_line.HasSwitch(switches::kEnableDeferredImageDecoding) ||
is_impl_side_painting_enabled_;
#endif
if (!use_skia_scaled_image_cache)
SkGraphics::SetImageCacheByteLimit(0u); SkGraphics::SetImageCacheByteLimit(0u);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment