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

Unified Diff: cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc

Issue 334133002: cc: Support on demand raster with ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review3 Created 6 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
index 0d31709f289c4bb7df80214d370f3c861ed0c583..b7eb516004a71474a6b1e6ef2525a690462cf3b1 100644
--- a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
+++ b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
@@ -54,6 +54,8 @@ class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest {
// Triggers pixel readback and ends the test.
LayerTreePixelTest::SwapBuffersOnThread(host_impl, result);
}
+
+ void RunOnDemandRasterPixelTest();
};
class BlueYellowLayerClient : public ContentLayerClient {
@@ -91,7 +93,7 @@ class BlueYellowLayerClient : public ContentLayerClient {
gfx::Rect layer_rect_;
};
-TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) {
+void LayerTreeHostOnDemandRasterPixelTest::RunOnDemandRasterPixelTest() {
// Use multiple colors in a single layer to prevent bypassing on-demand
// rasterization if a single solid color is detected in picture analysis.
gfx::Rect layer_rect(200, 200);
@@ -107,6 +109,23 @@ TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) {
base::FilePath(FILE_PATH_LITERAL("blue_yellow.png")));
}
+TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) {
+ RunOnDemandRasterPixelTest();
+}
+
+class LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced
+ : public LayerTreeHostOnDemandRasterPixelTest {
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ LayerTreeHostOnDemandRasterPixelTest::InitializeSettings(settings);
+ settings->gpu_rasterization_forced = true;
+ }
+};
+
+TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced,
+ RasterPictureLayer) {
+ RunOnDemandRasterPixelTest();
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698