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

Side by Side Diff: cc/layers/heads_up_display_layer.cc

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/layers/heads_up_display_layer.h ('k') | cc/layers/io_surface_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/heads_up_display_layer.h" 5 #include "cc/layers/heads_up_display_layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/layers/heads_up_display_layer_impl.h" 10 #include "cc/layers/heads_up_display_layer_impl.h"
11 #include "cc/trees/layer_tree_host.h" 11 #include "cc/trees/layer_tree_host.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() { 15 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() {
16 return make_scoped_refptr(new HeadsUpDisplayLayer()); 16 return make_scoped_refptr(new HeadsUpDisplayLayer());
17 } 17 }
18 18
19 HeadsUpDisplayLayer::HeadsUpDisplayLayer() {} 19 HeadsUpDisplayLayer::HeadsUpDisplayLayer() {}
20 20
21 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {} 21 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
22 22
23 void HeadsUpDisplayLayer::PrepareForCalculateDrawProperties( 23 void HeadsUpDisplayLayer::PrepareForCalculateDrawProperties(
24 gfx::Size device_viewport, float device_scale_factor) { 24 const gfx::Size& device_viewport, float device_scale_factor) {
25 gfx::Size device_viewport_in_layout_pixels = gfx::Size( 25 gfx::Size device_viewport_in_layout_pixels = gfx::Size(
26 device_viewport.width() / device_scale_factor, 26 device_viewport.width() / device_scale_factor,
27 device_viewport.height() / device_scale_factor); 27 device_viewport.height() / device_scale_factor);
28 28
29 gfx::Size bounds; 29 gfx::Size bounds;
30 gfx::Transform matrix; 30 gfx::Transform matrix;
31 matrix.MakeIdentity(); 31 matrix.MakeIdentity();
32 32
33 if (layer_tree_host()->debug_state().ShowHudRects()) { 33 if (layer_tree_host()->debug_state().ShowHudRects()) {
34 int max_texture_size = 34 int max_texture_size =
(...skipping 14 matching lines...) Expand all
49 49
50 bool HeadsUpDisplayLayer::DrawsContent() const { return true; } 50 bool HeadsUpDisplayLayer::DrawsContent() const { return true; }
51 51
52 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( 52 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
53 LayerTreeImpl* tree_impl) { 53 LayerTreeImpl* tree_impl) {
54 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_). 54 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_).
55 PassAs<LayerImpl>(); 55 PassAs<LayerImpl>();
56 } 56 }
57 57
58 } // namespace cc 58 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer.h ('k') | cc/layers/io_surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698