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

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

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 2 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/input/page_scale_animation.cc ('k') | cc/layers/layer.cc » ('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_impl.h" 5 #include "cc/layers/heads_up_display_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 resources_.erase(it_erase, resources_.end()); 125 resources_.erase(it_erase, resources_.end());
126 } 126 }
127 127
128 bool HeadsUpDisplayLayerImpl::WillDraw(DrawMode draw_mode, 128 bool HeadsUpDisplayLayerImpl::WillDraw(DrawMode draw_mode,
129 ResourceProvider* resource_provider) { 129 ResourceProvider* resource_provider) {
130 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) 130 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE)
131 return false; 131 return false;
132 132
133 internal_contents_scale_ = GetIdealContentsScale(); 133 internal_contents_scale_ = GetIdealContentsScale();
134 internal_content_bounds_ = 134 internal_content_bounds_ =
135 gfx::ToCeiledSize(gfx::ScaleSize(bounds(), internal_contents_scale_)); 135 gfx::ScaleToCeiledSize(bounds(), internal_contents_scale_);
136 136
137 ReleaseUnmatchedSizeResources(resource_provider); 137 ReleaseUnmatchedSizeResources(resource_provider);
138 AcquireResource(resource_provider); 138 AcquireResource(resource_provider);
139 return LayerImpl::WillDraw(draw_mode, resource_provider); 139 return LayerImpl::WillDraw(draw_mode, resource_provider);
140 } 140 }
141 141
142 void HeadsUpDisplayLayerImpl::AppendQuads( 142 void HeadsUpDisplayLayerImpl::AppendQuads(
143 RenderPass* render_pass, 143 RenderPass* render_pass,
144 AppendQuadsData* append_quads_data) { 144 AppendQuadsData* append_quads_data) {
145 if (!resources_.back()->id()) 145 if (!resources_.back()->id())
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 return "cc::HeadsUpDisplayLayerImpl"; 757 return "cc::HeadsUpDisplayLayerImpl";
758 } 758 }
759 759
760 void HeadsUpDisplayLayerImpl::AsValueInto( 760 void HeadsUpDisplayLayerImpl::AsValueInto(
761 base::trace_event::TracedValue* dict) const { 761 base::trace_event::TracedValue* dict) const {
762 LayerImpl::AsValueInto(dict); 762 LayerImpl::AsValueInto(dict);
763 dict->SetString("layer_name", "Heads Up Display Layer"); 763 dict->SetString("layer_name", "Heads Up Display Layer");
764 } 764 }
765 765
766 } // namespace cc 766 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/page_scale_animation.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698