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

Side by Side Diff: cc/output/delegating_renderer.cc

Issue 311253004: Invert DSF to map from delegated frame to layer space (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scale android layer up, remove cc::DRL::SetDisplaySize Created 6 years, 6 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 | Annotate | Revision Log
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/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 float device_scale_factor, 86 float device_scale_factor,
87 const gfx::Rect& device_viewport_rect, 87 const gfx::Rect& device_viewport_rect,
88 const gfx::Rect& device_clip_rect, 88 const gfx::Rect& device_clip_rect,
89 bool disable_picture_quad_image_filtering) { 89 bool disable_picture_quad_image_filtering) {
90 TRACE_EVENT0("cc", "DelegatingRenderer::DrawFrame"); 90 TRACE_EVENT0("cc", "DelegatingRenderer::DrawFrame");
91 91
92 DCHECK(!delegated_frame_data_); 92 DCHECK(!delegated_frame_data_);
93 93
94 delegated_frame_data_ = make_scoped_ptr(new DelegatedFrameData); 94 delegated_frame_data_ = make_scoped_ptr(new DelegatedFrameData);
95 DelegatedFrameData& out_data = *delegated_frame_data_; 95 DelegatedFrameData& out_data = *delegated_frame_data_;
96 out_data.device_scale_factor = device_scale_factor;
96 // Move the render passes and resources into the |out_frame|. 97 // Move the render passes and resources into the |out_frame|.
97 out_data.render_pass_list.swap(*render_passes_in_draw_order); 98 out_data.render_pass_list.swap(*render_passes_in_draw_order);
98 99
99 // Collect all resource ids in the render passes into a ResourceIdArray. 100 // Collect all resource ids in the render passes into a ResourceIdArray.
100 ResourceProvider::ResourceIdArray resources; 101 ResourceProvider::ResourceIdArray resources;
101 DrawQuad::ResourceIteratorCallback append_to_array = 102 DrawQuad::ResourceIteratorCallback append_to_array =
102 base::Bind(&AppendToArray, &resources); 103 base::Bind(&AppendToArray, &resources);
103 for (size_t i = 0; i < out_data.render_pass_list.size(); ++i) { 104 for (size_t i = 0; i < out_data.render_pass_list.size(); ++i) {
104 RenderPass* render_pass = out_data.render_pass_list.at(i); 105 RenderPass* render_pass = out_data.render_pass_list.at(i);
105 for (size_t j = 0; j < render_pass->quad_list.size(); ++j) 106 for (size_t j = 0; j < render_pass->quad_list.size(); ++j)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 gpu::ManagedMemoryStats stats; 158 gpu::ManagedMemoryStats stats;
158 stats.bytes_required = bytes_visible; 159 stats.bytes_required = bytes_visible;
159 stats.bytes_nice_to_have = bytes_visible_and_nearby; 160 stats.bytes_nice_to_have = bytes_visible_and_nearby;
160 stats.bytes_allocated = bytes_allocated; 161 stats.bytes_allocated = bytes_allocated;
161 stats.backbuffer_requested = false; 162 stats.backbuffer_requested = false;
162 163
163 context_provider->ContextSupport()->SendManagedMemoryStats(stats); 164 context_provider->ContextSupport()->SendManagedMemoryStats(stats);
164 } 165 }
165 166
166 } // namespace cc 167 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698