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

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

Issue 2282433002: Revert of cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: Created 4 years, 3 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.cc ('k') | cc/layers/painted_scrollbar_layer_unittest.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 bool HeadsUpDisplayLayerImpl::WillDraw(DrawMode draw_mode, 114 bool HeadsUpDisplayLayerImpl::WillDraw(DrawMode draw_mode,
115 ResourceProvider* resource_provider) { 115 ResourceProvider* resource_provider) {
116 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) 116 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE)
117 return false; 117 return false;
118 118
119 internal_contents_scale_ = GetIdealContentsScale(); 119 internal_contents_scale_ = GetIdealContentsScale();
120 internal_content_bounds_ = 120 internal_content_bounds_ =
121 gfx::ScaleToCeiledSize(bounds(), internal_contents_scale_); 121 gfx::ScaleToCeiledSize(bounds(), internal_contents_scale_);
122 internal_content_bounds_.SetToMin(
123 gfx::Size(resource_provider->max_texture_size(),
124 resource_provider->max_texture_size()));
125 122
126 ReleaseUnmatchedSizeResources(resource_provider); 123 ReleaseUnmatchedSizeResources(resource_provider);
127 AcquireResource(resource_provider); 124 AcquireResource(resource_provider);
128 return LayerImpl::WillDraw(draw_mode, resource_provider); 125 return LayerImpl::WillDraw(draw_mode, resource_provider);
129 } 126 }
130 127
131 void HeadsUpDisplayLayerImpl::AppendQuads( 128 void HeadsUpDisplayLayerImpl::AppendQuads(
132 RenderPass* render_pass, 129 RenderPass* render_pass,
133 AppendQuadsData* append_quads_data) { 130 AppendQuadsData* append_quads_data) {
134 if (!resources_.back()->id()) 131 if (!resources_.back()->id())
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 return "cc::HeadsUpDisplayLayerImpl"; 797 return "cc::HeadsUpDisplayLayerImpl";
801 } 798 }
802 799
803 void HeadsUpDisplayLayerImpl::AsValueInto( 800 void HeadsUpDisplayLayerImpl::AsValueInto(
804 base::trace_event::TracedValue* dict) const { 801 base::trace_event::TracedValue* dict) const {
805 LayerImpl::AsValueInto(dict); 802 LayerImpl::AsValueInto(dict);
806 dict->SetString("layer_name", "Heads Up Display Layer"); 803 dict->SetString("layer_name", "Heads Up Display Layer");
807 } 804 }
808 805
809 } // namespace cc 806 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer.cc ('k') | cc/layers/painted_scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698