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

Side by Side Diff: cc/output/overlay_unittest.cc

Issue 2351343002: Disable CA compositor if there are too many quads. (Closed)
Patch Set: Only look at RPDQs. Created 4 years, 3 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
« no previous file with comments | « cc/output/ca_layer_overlay.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 TEST_F(CALayerOverlayRPDQTest, RenderPassDrawQuadUnsupportedFilter) { 1876 TEST_F(CALayerOverlayRPDQTest, RenderPassDrawQuadUnsupportedFilter) {
1877 filters_.Append(FilterOperation::CreateZoomFilter(0.9f, 1)); 1877 filters_.Append(FilterOperation::CreateZoomFilter(0.9f, 1));
1878 quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect, 1878 quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
1879 kOverlayRect, render_pass_id_, 0, gfx::Vector2dF(), gfx::Size(), 1879 kOverlayRect, render_pass_id_, 0, gfx::Vector2dF(), gfx::Size(),
1880 filters_, gfx::Vector2dF(1, 1), gfx::PointF(), 1880 filters_, gfx::Vector2dF(1, 1), gfx::PointF(),
1881 background_filters_); 1881 background_filters_);
1882 ProcessForOverlays(); 1882 ProcessForOverlays();
1883 EXPECT_EQ(0U, ca_layer_list_.size()); 1883 EXPECT_EQ(0U, ca_layer_list_.size());
1884 } 1884 }
1885 1885
1886 TEST_F(CALayerOverlayRPDQTest, TooManyRenderPassDrawQuads) {
1887 filters_.Append(FilterOperation::CreateBlurFilter(0.8f));
1888 int count = 35;
1889
1890 for (int i = 0; i < count; ++i) {
1891 RenderPassDrawQuad* quad =
1892 pass_->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
1893 quad->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
1894 kOverlayRect, render_pass_id_, 2, gfx::Vector2dF(),
1895 gfx::Size(), filters_, gfx::Vector2dF(1, 1), gfx::PointF(),
1896 background_filters_);
1897 }
1898
1899 ProcessForOverlays();
1900 EXPECT_EQ(0U, ca_layer_list_.size());
1901 }
1902
1886 } // namespace 1903 } // namespace
1887 } // namespace cc 1904 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/ca_layer_overlay.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698