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() {
webkit::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction);
// Limit use of the scaled image cache to when deferred image decoding
// is enabled.
// TODO(reveman): Allow use of this cache on Android once
// SkDiscardablePixelRef is used for decoded images. crbug.com/330041
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)
// 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::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