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

Unified Diff: cc/heads_up_display_layer.cc

Issue 11369200: improving UI of FPS counter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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: cc/heads_up_display_layer.cc
diff --git a/cc/heads_up_display_layer.cc b/cc/heads_up_display_layer.cc
index 7cd8b4aaae9e2e6ae58c93e758ec1b96e3b02ac4..ef11deecaec42f4ce08121046f0d35e2a4a82da0 100644
--- a/cc/heads_up_display_layer.cc
+++ b/cc/heads_up_display_layer.cc
@@ -32,15 +32,20 @@ void HeadsUpDisplayLayer::update(ResourceUpdateQueue&, const OcclusionTracker*,
int maxTextureSize = layerTreeHost()->rendererCapabilities().maxTextureSize;
gfx::Size bounds;
+ WebKit::WebTransformationMatrix matrix;
+ matrix.makeIdentity();
+
if (settings.showPlatformLayerTree || settings.showDebugRects()) {
int width = std::min(maxTextureSize, layerTreeHost()->deviceViewportSize().width());
int height = std::min(maxTextureSize, layerTreeHost()->deviceViewportSize().height());
bounds = gfx::Size(width, height);
} else {
bounds = gfx::Size(256, 128);
+ matrix.translate(layerTreeHost()->deviceViewportSize().width() - 256, 0);
egraether 2012/11/12 23:44:06 Moves the HUDLayer to the right of the screen if o
}
setBounds(bounds);
+ setTransform(matrix);
}
bool HeadsUpDisplayLayer::drawsContent() const

Powered by Google App Engine
This is Rietveld 408576698