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

Unified Diff: cc/layer_tree_host_common_unittest.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 2 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: cc/layer_tree_host_common_unittest.cc
diff --git a/cc/layer_tree_host_common_unittest.cc b/cc/layer_tree_host_common_unittest.cc
index 2f8d0f2ae6746b654e0f1d495f9282139549b82a..d9bf998f40c5dce0efd4f4c376c69de658ef5dd7 100644
--- a/cc/layer_tree_host_common_unittest.cc
+++ b/cc/layer_tree_host_common_unittest.cc
@@ -734,8 +734,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithD
{
// This test checks for correct scroll compensation when the fixed-position container
// is the direct parent of the fixed-position layer.
-
- DebugScopedSetImplThread scopedImplThread;
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -775,8 +773,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithT
// Transforms are in general non-commutative; using something like a non-uniform scale
// helps to verify that translations and non-uniform scales are applied in the correct
// order.
-
- DebugScopedSetImplThread scopedImplThread;
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -818,8 +814,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithD
{
// This test checks for correct scroll compensation when the fixed-position container
// is NOT the direct parent of the fixed-position layer.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -862,8 +856,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithD
// This test checks for correct scroll compensation when the fixed-position container
// is NOT the direct parent of the fixed-position layer, and the hierarchy has various
// transforms that have to be processed in the correct order.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -924,8 +916,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithM
// This test checks for correct scroll compensation when the fixed-position container
// is NOT the direct parent of the fixed-position layer, and the hierarchy has various
// transforms that have to be processed in the correct order.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -986,8 +976,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithI
// contributes to a different renderSurface than the fixed-position layer. In this
// case, the surface drawTransforms also have to be accounted for when checking the
// scrollDelta.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -1059,8 +1047,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithM
// contributes to a different renderSurface than the fixed-position layer, with
// additional renderSurfaces in-between. This checks that the conversion to ancestor
// surfaces is accumulated properly in the final matrix transform.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -1170,8 +1156,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerWithC
// itself has a renderSurface. In this case, the container layer should be treated
// like a layer that contributes to a renderTarget, and that renderTarget
// is completely irrelevant; it should not affect the scroll compensation.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -1217,8 +1201,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerThatI
// This test checks the scenario where a fixed-position layer also happens to be a
// container itself for a descendant fixed position layer. In particular, the layer
// should not accidentally be fixed to itself.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -1254,8 +1236,6 @@ TEST(LayerTreeHostCommonTest, verifyScrollCompensationForFixedPositionLayerThatH
// This test checks scroll compensation when a fixed-position layer does not find any
// ancestor that is a "containerForFixedPositionLayers". In this situation, the layer should
// be fixed to the viewport -- not the rootLayer, which may have transforms of its own.
- DebugScopedSetImplThread scopedImplThread;
-
scoped_ptr<LayerImpl> root = createTreeForFixedPositionTests();
LayerImpl* child = root->children()[0];
LayerImpl* grandChild = child->children()[0];
@@ -2627,8 +2607,6 @@ TEST(LayerTreeHostCommonTest, verifyBackFaceCullingWithPreserves3dForFlatteningS
TEST(LayerTreeHostCommonTest, verifyHitTestingForEmptyLayerList)
{
// Hit testing on an empty renderSurfaceLayerList should return a null pointer.
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
std::vector<LayerImpl*> renderSurfaceLayerList;
IntPoint testPoint(0, 0);
@@ -2642,8 +2620,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForEmptyLayerList)
TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayer)
{
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(12345);
WebTransformationMatrix identityMatrix;
@@ -2684,8 +2660,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayer)
TEST(LayerTreeHostCommonTest, verifyHitTestingForUninvertibleTransform)
{
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(12345);
WebTransformationMatrix uninvertibleTransform;
@@ -2745,8 +2719,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForUninvertibleTransform)
TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePositionedLayer)
{
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(12345);
WebTransformationMatrix identityMatrix;
@@ -2788,8 +2760,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePositionedLayer)
TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleRotatedLayer)
{
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(12345);
WebTransformationMatrix identityMatrix;
@@ -2839,8 +2809,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleRotatedLayer)
TEST(LayerTreeHostCommonTest, verifyHitTestingForSinglePerspectiveLayer)
{
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(12345);
WebTransformationMatrix identityMatrix;
@@ -2901,8 +2869,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSingleLayerWithScaledContents)
// contentsScale is ignored, then hit testing will mis-interpret the visibleContentRect
// as being larger than the actual bounds of the layer.
//
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(1);
WebTransformationMatrix identityMatrix;
@@ -2963,8 +2929,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForSimpleClippedLayer)
{
// Test that hit-testing will only work for the visible portion of a layer, and not
// the entire layer bounds. Here we just test the simple axis-aligned case.
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
WebTransformationMatrix identityMatrix;
FloatPoint anchor(0, 0);
@@ -3031,8 +2995,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultiClippedRotatedLayer)
// combined create a triangle. The rotatedLeaf will only be visible where it overlaps
// this triangle.
//
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(123);
WebTransformationMatrix identityMatrix;
@@ -3131,8 +3093,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForNonClippingIntermediateLayer)
{
// This test checks that hit testing code does not accidentally clip to layer
// bounds for a layer that actually does not clip.
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
WebTransformationMatrix identityMatrix;
FloatPoint anchor(0, 0);
@@ -3192,8 +3152,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForNonClippingIntermediateLayer)
TEST(LayerTreeHostCommonTest, verifyHitTestingForMultipleLayers)
{
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(1);
WebTransformationMatrix identityMatrix;
@@ -3297,8 +3255,6 @@ TEST(LayerTreeHostCommonTest, verifyHitTestingForMultipleLayerLists)
// The geometry is set up similarly to the previous case, but
// all layers are forced to be renderSurfaces now.
//
- DebugScopedSetImplThread thisScopeIsOnImplThread;
-
scoped_ptr<LayerImpl> root = LayerImpl::create(1);
WebTransformationMatrix identityMatrix;

Powered by Google App Engine
This is Rietveld 408576698