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

Unified Diff: cc/debug/overdraw_metrics.cc

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 221292 Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/in_process_view_renderer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/overdraw_metrics.cc
diff --git a/cc/debug/overdraw_metrics.cc b/cc/debug/overdraw_metrics.cc
index 5b19370fe2c43bc11a70ed6092f946f91d2eabe3..a14284d800de785844271be79d9b57317eabb877 100644
--- a/cc/debug/overdraw_metrics.cc
+++ b/cc/debug/overdraw_metrics.cc
@@ -147,11 +147,11 @@ void OverdrawMetrics::RecordMetrics(
}
}
-static gfx::Size DeviceViewportSize(const LayerTreeHost* host) {
+static gfx::Size DrawViewportSize(const LayerTreeHost* host) {
return host->device_viewport_size();
}
-static gfx::Size DeviceViewportSize(const LayerTreeHostImpl* host_impl) {
- return host_impl->device_viewport_size();
+static gfx::Size DrawViewportSize(const LayerTreeHostImpl* host_impl) {
+ return host_impl->DrawViewportSize();
}
template <typename LayerTreeHostType>
@@ -160,13 +160,13 @@ void OverdrawMetrics::RecordMetricsInternal(
const LayerTreeHostType* layer_tree_host) const {
// This gives approximately 10x the percentage of pixels to fill the viewport
// once.
- float normalization = 1000.f / (DeviceViewportSize(layer_tree_host).width() *
- DeviceViewportSize(layer_tree_host).height());
+ float normalization = 1000.f / (DrawViewportSize(layer_tree_host).width() *
+ DrawViewportSize(layer_tree_host).height());
// This gives approximately 100x the percentage of tiles to fill the viewport
// once, if all tiles were 256x256.
float tile_normalization =
- 10000.f / (DeviceViewportSize(layer_tree_host).width() / 256.f *
- DeviceViewportSize(layer_tree_host).height() / 256.f);
+ 10000.f / (DrawViewportSize(layer_tree_host).width() / 256.f *
+ DrawViewportSize(layer_tree_host).height() / 256.f);
// This gives approximately 10x the percentage of bytes to fill the viewport
// once, assuming 4 bytes per pixel.
float byte_normalization = normalization / 4;
« no previous file with comments | « android_webview/browser/in_process_view_renderer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698