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

Unified Diff: content/renderer/render_view_impl.cc

Issue 314753002: Set up Finch experiment for expanded GPU rasterization trigger (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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());

Powered by Google App Engine
This is Rietveld 408576698