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

Unified Diff: cc/heads_up_display_layer.cc

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/heads_up_display_layer.h ('k') | cc/heads_up_display_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/heads_up_display_layer.cc
diff --git a/cc/heads_up_display_layer.cc b/cc/heads_up_display_layer.cc
deleted file mode 100644
index e61423d068b6b83b4616b25302324245afa4da82..0000000000000000000000000000000000000000
--- a/cc/heads_up_display_layer.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/heads_up_display_layer.h"
-
-#include "base/debug/trace_event.h"
-#include "cc/heads_up_display_layer_impl.h"
-#include "cc/trees/layer_tree_host.h"
-
-namespace cc {
-
-scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() {
- return make_scoped_refptr(new HeadsUpDisplayLayer());
-}
-
-HeadsUpDisplayLayer::HeadsUpDisplayLayer() : Layer() {
- SetBounds(gfx::Size(256, 256));
-}
-
-HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
-
-void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*,
- const OcclusionTracker*,
- RenderingStats*) {
- const LayerTreeDebugState& debug_state = layer_tree_host()->debug_state();
- int max_texture_size =
- layer_tree_host()->GetRendererCapabilities().max_texture_size;
-
- int device_viewport_in_layout_pixels_width =
- layer_tree_host()->device_viewport_size().width() /
- layer_tree_host()->device_scale_factor();
- int device_viewport_in_layout_pixels_height =
- layer_tree_host()->device_viewport_size().height() /
- layer_tree_host()->device_scale_factor();
-
- gfx::Size bounds;
- gfx::Transform matrix;
- matrix.MakeIdentity();
-
- if (debug_state.showPlatformLayerTree || debug_state.showHudRects()) {
- int width =
- std::min(max_texture_size, device_viewport_in_layout_pixels_width);
- int height =
- std::min(max_texture_size, device_viewport_in_layout_pixels_height);
- bounds = gfx::Size(width, height);
- } else {
- bounds = gfx::Size(256, 256);
- matrix.Translate(device_viewport_in_layout_pixels_width - 256.0, 0.0);
- }
-
- SetBounds(bounds);
- SetTransform(matrix);
-}
-
-bool HeadsUpDisplayLayer::DrawsContent() const { return true; }
-
-scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
- LayerTreeImpl* treeImpl) {
- return HeadsUpDisplayLayerImpl::Create(treeImpl, layer_id_).
- PassAs<LayerImpl>();
-}
-
-} // namespace cc
« no previous file with comments | « cc/heads_up_display_layer.h ('k') | cc/heads_up_display_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698