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

Unified Diff: cc/layers/heads_up_display_layer.cc

Issue 2282433002: Revert of cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: Created 4 years, 4 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/BUILD.gn ('k') | cc/layers/heads_up_display_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer.cc
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index f230b00736626e1686d0cd3c50b2bdcc8a781655..2feb1fa4015712608baa191e40fbd0dc8832aa66 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -41,7 +41,12 @@
matrix.MakeIdentity();
if (layer_tree_host()->debug_state().ShowHudRects()) {
- bounds = device_viewport_in_layout_pixels;
+ int max_texture_size =
+ layer_tree_host()->GetRendererCapabilities().max_texture_size;
+ bounds.SetSize(std::min(max_texture_size,
+ device_viewport_in_layout_pixels.width()),
+ std::min(max_texture_size,
+ device_viewport_in_layout_pixels.height()));
} else {
int size = 256;
bounds.SetSize(size, size);
« no previous file with comments | « cc/BUILD.gn ('k') | cc/layers/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698