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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 389933004: cc: Disable some failing unit tests on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 public: 2909 public:
2910 OcclusionTrackingSettings() { use_occlusion_for_tile_prioritization = true; } 2910 OcclusionTrackingSettings() { use_occlusion_for_tile_prioritization = true; }
2911 }; 2911 };
2912 2912
2913 class OcclusionTrackingPictureLayerImplTest : public PictureLayerImplTest { 2913 class OcclusionTrackingPictureLayerImplTest : public PictureLayerImplTest {
2914 public: 2914 public:
2915 OcclusionTrackingPictureLayerImplTest() 2915 OcclusionTrackingPictureLayerImplTest()
2916 : PictureLayerImplTest(OcclusionTrackingSettings()) {} 2916 : PictureLayerImplTest(OcclusionTrackingSettings()) {}
2917 }; 2917 };
2918 2918
2919 #if defined(OS_WIN)
2920 #define MAYBE_OccludedTilesSkippedDuringRasterization \
2921 DISABLED_OccludedTilesSkippedDuringRasterization
2922 #else
2923 #define MAYBE_OccludedTilesSkippedDuringRasterization \
2924 OccludedTilesSkippedDuringRasterization
2925 #endif
2919 TEST_F(OcclusionTrackingPictureLayerImplTest, 2926 TEST_F(OcclusionTrackingPictureLayerImplTest,
2920 OccludedTilesSkippedDuringRasterization) { 2927 MAYBE_OccludedTilesSkippedDuringRasterization) {
2921 gfx::Size tile_size(102, 102); 2928 gfx::Size tile_size(102, 102);
2922 gfx::Size layer_bounds(1000, 1000); 2929 gfx::Size layer_bounds(1000, 1000);
2923 gfx::Size viewport_size(500, 500); 2930 gfx::Size viewport_size(500, 500);
2924 gfx::Point occluding_layer_position(310, 0); 2931 gfx::Point occluding_layer_position(310, 0);
2925 2932
2926 scoped_refptr<FakePicturePileImpl> pending_pile = 2933 scoped_refptr<FakePicturePileImpl> pending_pile =
2927 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 2934 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
2928 SetupPendingTree(pending_pile); 2935 SetupPendingTree(pending_pile);
2929 pending_layer_->set_fixed_tile_size(tile_size); 2936 pending_layer_->set_fixed_tile_size(tile_size);
2930 2937
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
2993 EXPECT_FALSE(tile->is_occluded(PENDING_TREE)); 3000 EXPECT_FALSE(tile->is_occluded(PENDING_TREE));
2994 3001
2995 bool tile_is_visible = 3002 bool tile_is_visible =
2996 tile->content_rect().Intersects(pending_layer_->visible_content_rect()); 3003 tile->content_rect().Intersects(pending_layer_->visible_content_rect());
2997 if (tile_is_visible) 3004 if (tile_is_visible)
2998 unoccluded_tile_count++; 3005 unoccluded_tile_count++;
2999 } 3006 }
3000 EXPECT_EQ(unoccluded_tile_count, 0); 3007 EXPECT_EQ(unoccluded_tile_count, 0);
3001 } 3008 }
3002 3009
3010 #if defined(OS_WIN)
3011 #define MAYBE_OccludedTilesNotMarkedAsRequired \
3012 DISABLED_OccludedTilesNotMarkedAsRequired
3013 #else
3014 #define MAYBE_OccludedTilesNotMarkedAsRequired OccludedTilesNotMarkedAsRequired
3015 #endif
3003 TEST_F(OcclusionTrackingPictureLayerImplTest, 3016 TEST_F(OcclusionTrackingPictureLayerImplTest,
3004 OccludedTilesNotMarkedAsRequired) { 3017 OccludedTilesNotMarkedAsRequired) {
3005 gfx::Size tile_size(102, 102); 3018 gfx::Size tile_size(102, 102);
3006 gfx::Size layer_bounds(1000, 1000); 3019 gfx::Size layer_bounds(1000, 1000);
3007 gfx::Size viewport_size(500, 500); 3020 gfx::Size viewport_size(500, 500);
3008 gfx::Point occluding_layer_position(310, 0); 3021 gfx::Point occluding_layer_position(310, 0);
3009 3022
3010 scoped_refptr<FakePicturePileImpl> pending_pile = 3023 scoped_refptr<FakePicturePileImpl> pending_pile =
3011 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 3024 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
3012 SetupPendingTree(pending_pile); 3025 SetupPendingTree(pending_pile);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 // Unshared tiles are occluded on the active tree iff they lie beneath 3304 // Unshared tiles are occluded on the active tree iff they lie beneath
3292 // the occluding layer. 3305 // the occluding layer.
3293 EXPECT_EQ(tile->is_occluded(ACTIVE_TREE), 3306 EXPECT_EQ(tile->is_occluded(ACTIVE_TREE),
3294 scaled_content_rect.x() >= occluding_layer_position.x()); 3307 scaled_content_rect.x() >= occluding_layer_position.x());
3295 } 3308 }
3296 } 3309 }
3297 } 3310 }
3298 } 3311 }
3299 } // namespace 3312 } // namespace
3300 } // namespace cc 3313 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698