Chromium Code Reviews| Index: content/renderer/render_view_impl.cc |
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
| index 7257b007bca385082e9e507b6c4678334854ab50..048a9a2537e8a77d7fafbe4972df1ba7395e2bf9 100644 |
| --- a/content/renderer/render_view_impl.cc |
| +++ b/content/renderer/render_view_impl.cc |
| @@ -20,6 +20,7 @@ |
| #include "base/lazy_instance.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/message_loop/message_loop_proxy.h" |
| +#include "base/metrics/field_trial.h" |
| #include "base/metrics/histogram.h" |
| #include "base/path_service.h" |
| #include "base/process/kill.h" |
| @@ -472,6 +473,17 @@ static bool ShouldUseAcceleratedFixedRootBackground(float device_scale_factor) { |
| return DeviceScaleEnsuresTextQuality(device_scale_factor); |
| } |
| +static bool ShouldUseExpandedHeuristicsForGpuRasterization() { |
| + const char kGpuRasterizationContentWhitelistFieldTrialName[] = |
| + "GpuRasterizationExpandedContentWhitelist"; |
| + const char kGpuRasterizationContentWhitelistFieldTrialEnabledName[] = |
| + "Enabled"; |
| + |
| + return base::FieldTrialList::FindFullName( |
| + kGpuRasterizationContentWhitelistFieldTrialName) == |
|
Alexei Svitkine (slow)
2014/06/04 18:05:09
Nit: I think it's cleaner without the extra consta
ajuma
2014/06/04 18:25:33
Done.
|
| + kGpuRasterizationContentWhitelistFieldTrialEnabledName; |
| +} |
| + |
| static FaviconURL::IconType ToFaviconType(blink::WebIconURL::Type type) { |
| switch (type) { |
| case blink::WebIconURL::TypeFavicon: |
| @@ -751,6 +763,8 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) { |
| ShouldUseAcceleratedFixedRootBackground(device_scale_factor_)); |
| webview()->settings()->setCompositedScrollingForFramesEnabled( |
| ShouldUseCompositedScrollingForFrames(device_scale_factor_)); |
| + webview()->settings()->setUseExpandedHeuristicsForGpuRasterization( |
| + ShouldUseExpandedHeuristicsForGpuRasterization()); |
| ApplyWebPreferences(webkit_preferences_, webview()); |