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

Unified Diff: Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp

Issue 10146014: Merge 113677 - [chromium] Viewport is not filled when out of texture memory on mac (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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: Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp (revision 114754)
+++ Source/WebKit/chromium/tests/CCTiledLayerImplTest.cpp (working copy)
@@ -262,76 +262,4 @@
}
}
-TEST(CCTiledLayerImplTest, backgroundCoversViewport)
-{
- DebugScopedSetImplThread scopedImplThread;
-
- const IntSize tileSize(10, 10);
- const int numTilesX = 2;
- const int numTilesY = 2;
- const unsigned numTiles = numTilesX * numTilesY;
- const IntSize layerSize(tileSize.width() * numTilesX, tileSize.height() * numTilesY);
- OwnPtr<CCTiledLayerImpl> layer = createLayer(tileSize, layerSize, CCLayerTilingData::NoBorderTexels);
- layer->setBackgroundColor(Color::gray);
- layer->setBackgroundCoversViewport(true);
-
- // No gutter rects
- {
- IntRect clipRect = IntRect(IntPoint(), layerSize);
- layer->setClipRect(clipRect);
- layer->setVisibleLayerRect(IntRect(IntPoint(), layerSize));
-
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
-
- MockCCQuadCuller quadCuller;
- bool usedCheckerboard = false;
- layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard);
- EXPECT_EQ(quadCuller.quadList().size(), numTiles);
-
- for (size_t i = 0; i < quadCuller.quadList().size(); ++i)
- EXPECT_EQ(quadCuller.quadList()[i]->material(), CCDrawQuad::TiledContent);
- }
-
- // Empty visible content area (fullscreen gutter rect)
- {
- IntRect clipRect = IntRect(100, 100, 100, 100);
- layer->setClipRect(clipRect);
- layer->setVisibleLayerRect(IntRect());
-
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- MockCCQuadCuller quadCuller;
- bool usedCheckerboard = false;
- layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard);
-
- for (size_t i = 0; i < quadCuller.quadList().size(); ++i)
- EXPECT_EQ(quadCuller.quadList()[i]->material(), CCDrawQuad::SolidColor);
-
- verifyQuadsExactlyCoverRect(quadCuller.quadList(), clipRect);
- }
-
- // Content area in middle of clip rect (four surrounding gutter rects)
- {
- IntRect clipRect = IntRect(-50, -50, 100, 100);
- layer->setClipRect(clipRect);
- layer->setVisibleLayerRect(IntRect(IntPoint(), layerSize));
-
- OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
- MockCCQuadCuller quadCuller;
- bool usedCheckerboard = false;
- layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard);
-
- unsigned numContentTiles = 0, numGutterTiles = 0;
- for (size_t i = 0; i < quadCuller.quadList().size(); ++i) {
- if (quadCuller.quadList()[i]->material() == CCDrawQuad::TiledContent)
- numContentTiles++;
- else if (quadCuller.quadList()[i]->material() == CCDrawQuad::SolidColor)
- numGutterTiles++;
- }
- EXPECT_EQ(numContentTiles, numTiles);
- EXPECT_GE(numGutterTiles, 4u);
-
- verifyQuadsExactlyCoverRect(quadCuller.quadList(), clipRect);
- }
-}
-
} // namespace
« no previous file with comments | « Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp ('k') | Source/WebKit/chromium/tests/LayerChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698