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

Unified Diff: cc/layers/heads_up_display_layer.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/layers/heads_up_display_layer.h ('k') | cc/layers/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/layers/heads_up_display_layer.cc
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
deleted file mode 100644
index 5dd4bd24d52c0489ce3d0a490cd19f7104f6be5d..0000000000000000000000000000000000000000
--- a/cc/layers/heads_up_display_layer.cc
+++ /dev/null
@@ -1,62 +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/layers/heads_up_display_layer.h"
-
-#include <algorithm>
-
-#include "base/trace_event/trace_event.h"
-#include "cc/layers/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() {
- SetIsDrawable(true);
- UpdateDrawsContent(HasDrawableContent());
-}
-
-HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
-
-void HeadsUpDisplayLayer::PrepareForCalculateDrawProperties(
- const gfx::Size& device_viewport, float device_scale_factor) {
- gfx::Size device_viewport_in_layout_pixels = gfx::Size(
- device_viewport.width() / device_scale_factor,
- device_viewport.height() / device_scale_factor);
-
- gfx::Size bounds;
- gfx::Transform matrix;
- matrix.MakeIdentity();
-
- if (layer_tree_host()->debug_state().ShowHudRects()) {
- 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);
- matrix.Translate(device_viewport_in_layout_pixels.width() - size, 0.0);
- }
-
- SetBounds(bounds);
- SetTransform(matrix);
-}
-
-bool HeadsUpDisplayLayer::HasDrawableContent() const {
- return true;
-}
-
-scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
- LayerTreeImpl* tree_impl) {
- return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_);
-}
-
-} // namespace cc
« no previous file with comments | « cc/layers/heads_up_display_layer.h ('k') | cc/layers/heads_up_display_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698