Skip to content

Commit

Permalink
cc: Make 1/4th default low res scale.
Browse files Browse the repository at this point in the history
This patch makes the default low res scale factor be 0.25 * high res
scale factor. The reasoning is that 0.125 looks too blurry. With low
quality low res tiles in play, 0.25 should still incur a performance
penalty, but it shouldn't be too bad, and look a bit better.

BUG=268203

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226371 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
vmpstr@chromium.org committed Oct 2, 2013
1 parent 567ac4b commit ce07b78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
10 changes: 5 additions & 5 deletions cc/layers/picture_layer_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -742,21 +742,21 @@ TEST_F(PictureLayerImplTest, DontAddLowResDuringAnimation) {
EXPECT_BOTH_EQ(num_tilings(), 2u);

// Page scale animation, new high res, but not new low res because animating.
contents_scale = 4.f;
page_scale = 4.f;
contents_scale = 2.f;
page_scale = 2.f;
animating_transform = true;
SetContentsScaleOnBothLayers(
contents_scale, device_scale, page_scale, animating_transform);
EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 4.f);
EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 2.f);
EXPECT_BOTH_EQ(LowResTiling()->contents_scale(), low_res_factor);
EXPECT_BOTH_EQ(num_tilings(), 3u);

// Stop animating, new low res gets created for final page scale.
animating_transform = false;
SetContentsScaleOnBothLayers(
contents_scale, device_scale, page_scale, animating_transform);
EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 4.f);
EXPECT_BOTH_EQ(LowResTiling()->contents_scale(), 4.f * low_res_factor);
EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 2.f);
EXPECT_BOTH_EQ(LowResTiling()->contents_scale(), 2.f * low_res_factor);
EXPECT_BOTH_EQ(num_tilings(), 4u);
}

Expand Down
2 changes: 1 addition & 1 deletion cc/trees/layer_tree_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LayerTreeSettings::LayerTreeSettings()
maximum_number_of_failed_draws_before_draw_is_forced_(3),
layer_transforms_should_scale_layer_contents(false),
minimum_contents_scale(0.0625f),
low_res_contents_scale_factor(0.125f),
low_res_contents_scale_factor(0.25f),
top_controls_height(0.f),
top_controls_show_threshold(0.5f),
top_controls_hide_threshold(0.5f),
Expand Down
12 changes: 0 additions & 12 deletions content/browser/gpu/gpu_data_manager_impl_private.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@ void ApplyAndroidWorkarounds(const gpu::GPUInfo& gpu_info,
std::string renderer(StringToLowerASCII(gpu_info.gl_renderer));
bool is_img =
gpu_info.gl_vendor.find("Imagination") != std::string::npos;
bool is_nexus7 =
gpu_info.machine_model.find("Nexus 7") != std::string::npos;
bool is_nexus10 =
gpu_info.machine_model.find("Nexus 10") != std::string::npos;

gfx::DeviceDisplayInfo info;
int default_tile_size = 256;
Expand Down Expand Up @@ -300,14 +296,6 @@ void ApplyAndroidWorkarounds(const gpu::GPUInfo& gpu_info,
command_line->AppendSwitchASCII(
switches::kDefaultTileHeight, size.str());
}

// Increase the resolution of low resolution tiles for Nexus tablets.
if ((is_nexus7 || is_nexus10) &&
!command_line->HasSwitch(
cc::switches::kLowResolutionContentsScaleFactor)) {
command_line->AppendSwitchASCII(
cc::switches::kLowResolutionContentsScaleFactor, "0.25");
}
}
#endif // OS_ANDROID

Expand Down

0 comments on commit ce07b78

Please sign in to comment.