summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-20 08:30:34 +0000
committeraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-20 08:30:34 +0000
commiteb8b32eeb3518b71da5b23369fd96d6424db8731 (patch)
treeac6ee158093b21e0bcd18ebd7fef0930944a6b80
parentd232baf1938667833c31c58ff8ba243e25a90d02 (diff)
downloadchromium_src-eb8b32eeb3518b71da5b23369fd96d6424db8731.zip
chromium_src-eb8b32eeb3518b71da5b23369fd96d6424db8731.tar.gz
chromium_src-eb8b32eeb3518b71da5b23369fd96d6424db8731.tar.bz2
Remove solid_color_scrollbars CC LayerTreeSetting.
This setting is no longer needed because Blink theming determines the scrollbar type instead. This deletes it and cleans up two residual abuses of it: 1. In LayerTreeHostImpl::UnscaledScrollableViewportSize() it was used to determine whether we should use the container layer size or the device viewport size as the scrolling viewport size. A more logical way of inferring this is by checking whether the container layer clips or not (it currently does on all platforms except Android). 2. In LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted() it was used to force creating the PrioritizedResourceManager if painted scrollbars might exist. Painted scrollbars have now transitioned to the UIResource mechanism so this hack is unnecessary. This change exposed about 20 unit tests that try to use ContentLayers in impl-side-painting mode. NOTRY=true BUG=309239 Review URL: https://codereview.chromium.org/30313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229691 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/layers/picture_layer_impl_unittest.cc11
-rw-r--r--cc/layers/scrollbar_layer_unittest.cc1
-rw-r--r--cc/test/layer_tree_pixel_test.cc19
-rw-r--r--cc/test/layer_tree_pixel_test.h1
-rw-r--r--cc/test/layer_tree_test.h36
-rw-r--r--cc/trees/layer_tree_host.cc3
-rw-r--r--cc/trees/layer_tree_host_impl.cc8
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc1
-rw-r--r--cc/trees/layer_tree_host_pixeltest_masks.cc7
-rw-r--r--cc/trees/layer_tree_host_pixeltest_readback.cc8
-rw-r--r--cc/trees/layer_tree_host_unittest.cc35
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc26
-rw-r--r--cc/trees/layer_tree_host_unittest_damage.cc6
-rw-r--r--cc/trees/layer_tree_impl.cc8
-rw-r--r--cc/trees/layer_tree_settings.cc1
-rw-r--r--cc/trees/layer_tree_settings.h1
-rw-r--r--content/browser/web_contents/web_contents_impl.cc3
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc2
18 files changed, 82 insertions, 95 deletions
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index baba6e1..f9dfb99 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -1106,19 +1106,10 @@ TEST_F(PictureLayerImplTest, ActivateUninitializedLayer) {
EXPECT_FALSE(active_layer_->needs_post_commit_initialization());
}
-// Solid color scrollbar setting is required for deferred initialization.
-class ImplSidePaintingSolidColorScrollbarSettings
- : public ImplSidePaintingSettings {
- public:
- ImplSidePaintingSolidColorScrollbarSettings() {
- solid_color_scrollbars = true;
- }
-};
-
class DeferredInitPictureLayerImplTest : public PictureLayerImplTest {
public:
DeferredInitPictureLayerImplTest()
- : PictureLayerImplTest(ImplSidePaintingSolidColorScrollbarSettings()) {}
+ : PictureLayerImplTest(ImplSidePaintingSettings()) {}
virtual void InitializeRenderer() OVERRIDE {
host_impl_.InitializeRenderer(FakeOutputSurface::CreateDeferredGL(
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 2e1b4b6..250d610 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -364,7 +364,6 @@ class ScrollbarLayerSolidColorThumbTest : public testing::Test {
public:
ScrollbarLayerSolidColorThumbTest() {
LayerTreeSettings layer_tree_settings;
- layer_tree_settings.solid_color_scrollbars = true;
host_impl_.reset(new FakeLayerTreeHostImpl(layer_tree_settings, &proxy_));
const int kThumbThickness = 3;
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc
index 94fce72..70e6223 100644
--- a/cc/test/layer_tree_pixel_test.cc
+++ b/cc/test/layer_tree_pixel_test.cc
@@ -25,7 +25,8 @@ namespace cc {
LayerTreePixelTest::LayerTreePixelTest()
: pixel_comparator_(new ExactPixelComparator(true)),
test_type_(GL_WITH_DEFAULT),
- pending_texture_mailbox_callbacks_(0) {}
+ pending_texture_mailbox_callbacks_(0),
+ impl_side_painting_(true) {}
LayerTreePixelTest::~LayerTreePixelTest() {}
@@ -145,12 +146,12 @@ scoped_refptr<SolidColorLayer> LayerTreePixelTest::
border_width,
rect.height() - border_width * 2),
border_color);
- scoped_refptr<SolidColorLayer> border_right = CreateSolidColorLayer(
- gfx::Rect(rect.width() - border_width,
- border_width,
- border_width,
- rect.height() - border_width * 2),
- border_color);
+ scoped_refptr<SolidColorLayer> border_right =
+ CreateSolidColorLayer(gfx::Rect(rect.width() - border_width,
+ border_width,
+ border_width,
+ rect.height() - border_width * 2),
+ border_color);
scoped_refptr<SolidColorLayer> border_bottom = CreateSolidColorLayer(
gfx::Rect(0, rect.height() - border_width, rect.width(), border_width),
border_color);
@@ -188,7 +189,7 @@ void LayerTreePixelTest::RunPixelTest(
content_root_ = content_root;
readback_target_ = NULL;
ref_file_ = file_name;
- RunTest(true, false, true);
+ RunTest(true, false, impl_side_painting_);
}
void LayerTreePixelTest::RunPixelTestWithReadbackTarget(
@@ -200,7 +201,7 @@ void LayerTreePixelTest::RunPixelTestWithReadbackTarget(
content_root_ = content_root;
readback_target_ = target;
ref_file_ = file_name;
- RunTest(true, false, true);
+ RunTest(true, false, impl_side_painting_);
}
void LayerTreePixelTest::SetupTree() {
diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h
index 1214f61..03747c0 100644
--- a/cc/test/layer_tree_pixel_test.h
+++ b/cc/test/layer_tree_pixel_test.h
@@ -99,6 +99,7 @@ class LayerTreePixelTest : public LayerTreeTest {
scoped_ptr<SkBitmap> result_bitmap_;
std::vector<scoped_refptr<TextureLayer> > texture_layers_;
int pending_texture_mailbox_callbacks_;
+ bool impl_side_painting_;
};
} // namespace cc
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index f027c06..4fb5525 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -213,38 +213,62 @@ class LayerTreeTest : public testing::Test, public TestHooks {
SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
-#define MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
+#define MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
TEST_F(TEST_FIXTURE_NAME, RunMultiThread_DirectRenderer_MainThreadPaint) { \
RunTest(true, false, false); \
- } \
+ }
+
+#define MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
+ MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
TEST_F(TEST_FIXTURE_NAME, RunMultiThread_DirectRenderer_ImplSidePaint) { \
RunTest(true, false, true); \
} \
class MultiThreadDirectNeedsSemicolon##TEST_FIXTURE_NAME {}
+#define MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
+ TEST_F(TEST_FIXTURE_NAME, \
+ RunMultiThread_DelegatingRenderer_MainThreadPaint) { \
+ RunTest(true, true, false); \
+ }
+
#define MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
- TEST_F(TEST_FIXTURE_NAME, \
- RunMultiThread_DelegatingRenderer_MainThreadPaint) { \
- RunTest(true, true, false); \
- } \
+ MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)\
TEST_F(TEST_FIXTURE_NAME, \
RunMultiThread_DelegatingRenderer_ImplSidePaint) { \
RunTest(true, true, true); \
} \
class MultiThreadDelegatingNeedsSemicolon##TEST_FIXTURE_NAME {}
+#define MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
+ MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \
+ MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
+
#define MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
+#define SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F( \
+ TEST_FIXTURE_NAME) \
+ SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
+ MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
+
#define SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME)
+#define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F( \
+ TEST_FIXTURE_NAME) \
+ SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
+ MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
+
#define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \
SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
+#define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
+ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \
+ SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
+
#define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 6e153d1..7697259 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -211,8 +211,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
if (success) {
output_surface_lost_ = false;
- if (!contents_texture_manager_ &&
- (!settings_.impl_side_painting || !settings_.solid_color_scrollbars)) {
+ if (!contents_texture_manager_ && !settings_.impl_side_painting) {
contents_texture_manager_ =
PrioritizedResourceManager::Create(proxy_.get());
surface_memory_placeholder_ =
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index fe9b8d7..ad81d36 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1401,10 +1401,10 @@ void LayerTreeHostImpl::SetNeedsBeginFrame(bool enable) {
}
gfx::SizeF LayerTreeHostImpl::UnscaledScrollableViewportSize() const {
- // The container layer bounds should be used if non-overlay scrollbars may
- // exist since it adjusts for them.
+ // Use the root container layer bounds if it clips to them, otherwise, the
+ // true viewport size should be used.
LayerImpl* container_layer = active_tree_->RootContainerLayer();
- if (!settings_.solid_color_scrollbars && container_layer) {
+ if (container_layer && container_layer->masks_to_bounds()) {
DCHECK(!top_controls_manager_);
DCHECK_EQ(0, overdraw_bottom_height_);
return container_layer->bounds();
@@ -1736,7 +1736,6 @@ bool LayerTreeHostImpl::DeferredInitialize(
scoped_refptr<ContextProvider> offscreen_context_provider) {
DCHECK(output_surface_->capabilities().deferred_gl_initialization);
DCHECK(settings_.impl_side_painting);
- DCHECK(settings_.solid_color_scrollbars);
DCHECK(output_surface_->context_provider());
ReleaseTreeResources();
@@ -1793,7 +1792,6 @@ bool LayerTreeHostImpl::DeferredInitialize(
void LayerTreeHostImpl::ReleaseGL() {
DCHECK(output_surface_->capabilities().deferred_gl_initialization);
DCHECK(settings_.impl_side_painting);
- DCHECK(settings_.solid_color_scrollbars);
DCHECK(output_surface_->context_provider());
ReleaseTreeResources();
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 126eddd..d761c89 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -91,7 +91,6 @@ class LayerTreeHostImplTest : public testing::Test,
LayerTreeSettings settings;
settings.minimum_occlusion_tracking_size = gfx::Size();
settings.impl_side_painting = true;
- settings.solid_color_scrollbars = true;
host_impl_ = LayerTreeHostImpl::Create(settings,
this,
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index 90570ec..1d4f893 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -58,6 +58,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfLayer) {
mask->SetIsMask(true);
green->SetMaskLayer(mask.get());
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL("mask_of_layer.png")));
@@ -88,6 +89,7 @@ TEST_F(LayerTreeHostMasksPixelTest, ImageMaskOfLayer) {
green->SetMaskLayer(mask.get());
background->AddChild(green);
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL("image_mask_of_layer.png")));
@@ -116,6 +118,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfClippedLayer) {
mask->SetIsMask(true);
green->SetMaskLayer(mask.get());
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL("mask_of_clipped_layer.png")));
@@ -145,6 +148,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskWithReplica) {
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL("mask_with_replica.png")));
@@ -183,6 +187,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskWithReplicaOfClippedLayer) {
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL(
@@ -218,6 +223,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfReplica) {
replica->SetMaskLayer(mask.get());
green->SetReplicaLayer(replica.get());
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL("mask_of_replica.png")));
@@ -260,6 +266,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfReplicaOfClippedLayer) {
replica->SetMaskLayer(mask.get());
green->SetReplicaLayer(replica.get());
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_BITMAP,
background,
base::FilePath(FILE_PATH_LITERAL(
diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc
index 9ee45ec..e5bfcd2 100644
--- a/cc/trees/layer_tree_host_pixeltest_readback.cc
+++ b/cc/trees/layer_tree_host_pixeltest_readback.cc
@@ -679,6 +679,7 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
copy_subrect_ = gfx::Rect(25, 25, 50, 50);
device_scale_factor_ = 2.f;
+ this->impl_side_painting_ = false;
RunPixelTest(SOFTWARE_WITH_DEFAULT,
background,
base::FilePath(FILE_PATH_LITERAL(
@@ -709,6 +710,7 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
copy_subrect_ = gfx::Rect(25, 25, 50, 50);
device_scale_factor_ = 2.f;
+ this->impl_side_painting_ = false;
RunPixelTest(GL_WITH_DEFAULT,
background,
base::FilePath(FILE_PATH_LITERAL(
@@ -740,6 +742,7 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
copy_subrect_ = gfx::Rect(25, 25, 50, 50);
device_scale_factor_ = 2.f;
+ this->impl_side_painting_ = false;
RunPixelTestWithReadbackTarget(SOFTWARE_WITH_DEFAULT,
background,
green.get(),
@@ -772,6 +775,7 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
copy_subrect_ = gfx::Rect(25, 25, 50, 50);
device_scale_factor_ = 2.f;
+ this->impl_side_painting_ = false;
RunPixelTestWithReadbackTarget(GL_WITH_DEFAULT,
background,
green.get(),
@@ -870,6 +874,7 @@ TEST_F(LayerTreeHostReadbackViaCompositeAndReadbackPixelTest,
device_viewport_copy_subrect_ = gfx::Rect(50, 50, 100, 100);
device_scale_factor_ = 1.f;
+ this->impl_side_painting_ = false;
RunPixelTestWithReadbackTarget(SOFTWARE_WITH_DEFAULT,
background,
green.get(),
@@ -901,6 +906,7 @@ TEST_F(LayerTreeHostReadbackViaCompositeAndReadbackPixelTest,
device_viewport_copy_subrect_ = gfx::Rect(50, 50, 100, 100);
device_scale_factor_ = 2.f;
+ this->impl_side_painting_ = false;
RunPixelTestWithReadbackTarget(SOFTWARE_WITH_DEFAULT,
background,
green.get(),
@@ -932,6 +938,7 @@ TEST_F(LayerTreeHostReadbackViaCompositeAndReadbackPixelTest,
device_viewport_copy_subrect_ = gfx::Rect(50, 50, 100, 100);
device_scale_factor_ = 1.f;
+ this->impl_side_painting_ = false;
RunPixelTestWithReadbackTarget(GL_WITH_DEFAULT,
background,
green.get(),
@@ -963,6 +970,7 @@ TEST_F(LayerTreeHostReadbackViaCompositeAndReadbackPixelTest,
device_viewport_copy_subrect_ = gfx::Rect(50, 50, 100, 100);
device_scale_factor_ = 2.f;
+ this->impl_side_painting_ = false;
RunPixelTestWithReadbackTarget(GL_WITH_DEFAULT,
background,
green.get(),
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 14db20d..c5127b1 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1100,7 +1100,7 @@ class DISABLED_LayerTreeHostTestStartPageScaleAnimation
};
// Disabled. See: crbug.com/280508
-MULTI_THREAD_TEST_F(DISABLED_LayerTreeHostTestStartPageScaleAnimation);
+MULTI_THREAD_NOIMPL_TEST_F(DISABLED_LayerTreeHostTestStartPageScaleAnimation);
class LayerTreeHostTestSetVisible : public LayerTreeHostTest {
public:
@@ -1447,7 +1447,7 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest {
int drew_frame_;
};
-MULTI_THREAD_DIRECT_RENDERER_TEST_F(
+MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
LayerTreeHostTestDirectRendererAtomicCommit);
class LayerTreeHostTestDelegatingRendererAtomicCommit
@@ -1500,7 +1500,7 @@ class LayerTreeHostTestDelegatingRendererAtomicCommit
}
};
-MULTI_THREAD_DELEGATING_RENDERER_TEST_F(
+MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(
LayerTreeHostTestDelegatingRendererAtomicCommit);
static void SetLayerPropertiesForTesting(Layer* layer,
@@ -1841,7 +1841,7 @@ class LayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
};
// Surfaces don't exist with a delegated renderer.
-SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
+SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
LayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit);
class EvictionTestLayer : public Layer {
@@ -2065,7 +2065,7 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest {
int num_commits_;
};
-MULTI_THREAD_TEST_F(LayerTreeHostTestEvictTextures);
+MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostTestEvictTextures);
class LayerTreeHostTestContinuousCommit : public LayerTreeHostTest {
public:
@@ -2156,7 +2156,7 @@ class LayerTreeHostTestContinuousInvalidate : public LayerTreeHostTest {
int num_draw_layers_;
};
-MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousInvalidate);
+MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostTestContinuousInvalidate);
class LayerTreeHostTestDeferCommits : public LayerTreeHostTest {
public:
@@ -2391,7 +2391,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted
int num_commits_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(
+SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(
LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted);
class LayerTreeHostTestLCDNotification : public LayerTreeHostTest {
@@ -2937,12 +2937,6 @@ TEST_F(LayerTreeHostTestAsyncReadback,
RunTest(true, false, false);
}
-TEST_F(LayerTreeHostTestAsyncReadback,
- GLRenderer_RunMultiThread_ImplSidePainting) {
- use_gl_renderer_ = true;
- RunTest(true, false, true);
-}
-
TEST_F(LayerTreeHostTestAsyncReadback, SoftwareRenderer_RunSingleThread) {
use_gl_renderer_ = false;
RunTest(false, false, false);
@@ -2954,12 +2948,6 @@ TEST_F(LayerTreeHostTestAsyncReadback,
RunTest(true, false, false);
}
-TEST_F(LayerTreeHostTestAsyncReadback,
- SoftwareRenderer_RunMultiThread_ImplSidePainting) {
- use_gl_renderer_ = false;
- RunTest(true, false, true);
-}
-
class LayerTreeHostTestAsyncReadbackLayerDestroyed : public LayerTreeHostTest {
protected:
virtual void SetupTree() OVERRIDE {
@@ -3149,7 +3137,7 @@ class LayerTreeHostTestAsyncReadbackInHiddenSubtree : public LayerTreeHostTest {
};
// No output to copy for delegated renderers.
-SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
+SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
LayerTreeHostTestAsyncReadbackInHiddenSubtree);
class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
@@ -3347,7 +3335,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw : public LayerTreeHostTest {
};
// No output to copy for delegated renderers.
-SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
+SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
LayerTreeHostTestAsyncTwoReadbacksWithoutDraw);
class LayerTreeHostTestAsyncReadbackLostOutputSurface
@@ -3482,7 +3470,7 @@ class LayerTreeHostTestAsyncReadbackLostOutputSurface
};
// No output to copy for delegated renderers.
-SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
+SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(
LayerTreeHostTestAsyncReadbackLostOutputSurface);
class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest {
@@ -3561,7 +3549,6 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
// PictureLayer can only be used with impl side painting enabled.
settings->impl_side_painting = true;
- settings->solid_color_scrollbars = true;
}
virtual void SetupTree() OVERRIDE {
@@ -4921,7 +4908,7 @@ class LayerTreeHostTestMemoryLimits : public LayerTreeHostTest {
int num_commits_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestMemoryLimits);
+SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostTestMemoryLimits);
class LayerSetsNeedsFilterContext : public Layer {
public:
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index f68a7aa..e4a0ca7 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -509,23 +509,11 @@ TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
}
TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- NoSurface_MultiThread_DirectRenderer_ImplSidePaint) {
- use_surface_ = false;
- RunTest(true, false, true);
-}
-
-TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
NoSurface_MultiThread_DelegatingRenderer_MainThreadPaint) {
use_surface_ = false;
RunTest(true, true, false);
}
-TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- NoSurface_MultiThread_DelegatingRenderer_ImplSidePaint) {
- use_surface_ = false;
- RunTest(true, true, true);
-}
-
// Surfaces don't exist with a delegating renderer.
TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
WithSurface_SingleThread_DirectRenderer) {
@@ -539,12 +527,6 @@ TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
RunTest(true, false, false);
}
-TEST_F(LayerTreeHostContextTestLostContextSucceedsWithContent,
- WithSurface_MultiThread_DirectRenderer_ImplSidePaint) {
- use_surface_ = true;
- RunTest(true, false, true);
-}
-
class LayerTreeHostContextTestOffscreenContextFails
: public LayerTreeHostContextTest {
public:
@@ -907,12 +889,6 @@ TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseAfterEvict_MultiThread_DirectRenderer_ImplSidePaint) {
- lose_after_evict_ = true;
- RunTest(true, false, true);
-}
-
-TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseAfterEvict_MultiThread_DelegatingRenderer_MainThreadPaint) {
lose_after_evict_ = true;
RunTest(true, true, false);
@@ -1017,7 +993,7 @@ class LayerTreeHostContextTestLostContextWhileUpdatingResources
int times_to_lose_on_end_query_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(
+SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(
LayerTreeHostContextTestLostContextWhileUpdatingResources);
class LayerTreeHostContextTestLayersNotified
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index bb66b20..83831f6 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -331,7 +331,8 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap
int did_swap_and_succeed_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestNoDamageDoesNotSwap);
+SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(
+ LayerTreeHostDamageTestNoDamageDoesNotSwap);
class LayerTreeHostDamageTestNoDamageReadbackDoesDraw
: public LayerTreeHostDamageTest {
@@ -509,12 +510,13 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest {
gfx::RectF child_damage_rect_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestForcedFullDamage);
+SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostDamageTestForcedFullDamage);
class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest {
virtual void SetupTree() OVERRIDE {
scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(gfx::Size(400, 400));
+ root_layer->SetMasksToBounds(true);
layer_tree_host()->SetRootLayer(root_layer);
scoped_refptr<Layer> content_layer = FakeContentLayer::Create(&client_);
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index d124a63..3e3d64c 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -311,8 +311,6 @@ void LayerTreeImpl::ClearViewportLayers() {
// of login that works for both scrollbar layer types. This is already planned
// as part of the larger pinch-zoom re-factoring viewport.
void LayerTreeImpl::UpdateSolidColorScrollbars() {
- DCHECK(settings().solid_color_scrollbars);
-
LayerImpl* root_scroll = RootScrollLayer();
DCHECK(root_scroll);
DCHECK(IsActiveTree());
@@ -343,9 +341,9 @@ void LayerTreeImpl::UpdateDrawProperties() {
if (IsActiveTree() && RootScrollLayer() && RootContainerLayer())
UpdateRootScrollLayerSizeDelta();
- if (settings().solid_color_scrollbars &&
- IsActiveTree() &&
- RootScrollLayer()) {
+ if (IsActiveTree() &&
+ RootContainerLayer()
+ && !RootContainerLayer()->masks_to_bounds()) {
UpdateSolidColorScrollbars();
}
diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc
index 894436b..b7aafbb 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -29,7 +29,6 @@ LayerTreeSettings::LayerTreeSettings()
scrollbar_animator(NoAnimator),
scrollbar_linear_fade_delay_ms(300),
scrollbar_linear_fade_length_ms(300),
- solid_color_scrollbars(false),
solid_color_scrollbar_color(SK_ColorWHITE),
calculate_top_controls_position(false),
use_memory_management(true),
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index d8ec0e3..ca063b8 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -40,7 +40,6 @@ class CC_EXPORT LayerTreeSettings {
ScrollbarAnimator scrollbar_animator;
int scrollbar_linear_fade_delay_ms;
int scrollbar_linear_fade_length_ms;
- bool solid_color_scrollbars;
SkColor solid_color_scrollbar_color;
bool calculate_top_controls_position;
bool use_memory_management;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7f9b824..18e11ca 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -589,9 +589,10 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
prefs.pinch_virtual_viewport_enabled = true;
prefs.pinch_overlay_scrollbar_thickness = 10;
}
+ prefs.use_solid_color_scrollbars = command_line.HasSwitch(
+ switches::kEnableOverlayScrollbars);
#if defined(OS_ANDROID)
- prefs.use_solid_color_scrollbars = true;
prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
switches::kDisableGestureRequirementForMediaPlayback);
prefs.user_gesture_required_for_media_fullscreen = !command_line.HasSwitch(
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 858f226f..c08750a 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -282,7 +282,6 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
// TODO(danakj): Move these to the android code.
settings.max_partial_texture_updates = 0;
settings.scrollbar_animator = cc::LayerTreeSettings::LinearFade;
- settings.solid_color_scrollbars = true;
settings.solid_color_scrollbar_color =
cmd->HasSwitch(switches::kHideScrollbars)
? SK_ColorTRANSPARENT
@@ -301,7 +300,6 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
#elif !defined(OS_MACOSX)
if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) {
settings.scrollbar_animator = cc::LayerTreeSettings::Thinning;
- settings.solid_color_scrollbars = true;
}
if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) ||
cmd->HasSwitch(switches::kEnableOverlayScrollbars)) {