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

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

Issue 1304303002: Mac Overlays: Add sandwich strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@overlay_debug
Patch Set: Ready for pre-review Created 5 years, 4 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
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/direct_renderer.h" 5 #include "cc/output/direct_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // Only reshape when we know we are going to draw. Otherwise, the reshape 217 // Only reshape when we know we are going to draw. Otherwise, the reshape
218 // can leave the window at the wrong size if we never draw and the proper 218 // can leave the window at the wrong size if we never draw and the proper
219 // viewport size is never set. 219 // viewport size is never set.
220 output_surface_->Reshape(device_viewport_rect.size(), device_scale_factor); 220 output_surface_->Reshape(device_viewport_rect.size(), device_scale_factor);
221 221
222 BeginDrawingFrame(&frame); 222 BeginDrawingFrame(&frame);
223 223
224 // If we have any copy requests, we can't remove any quads for overlays, 224 // If we have any copy requests, we can't remove any quads for overlays,
225 // otherwise the framebuffer will be missing the overlay contents. 225 // otherwise the framebuffer will be missing the overlay contents.
226 if (root_render_pass->copy_requests.empty()) { 226 if (root_render_pass->copy_requests.empty()) {
227 overlay_processor_->ProcessForOverlays(render_passes_in_draw_order, 227 OverlayProcessor::RendererState renderer_state;
228 &frame.overlay_list); 228 renderer_state.device_scale_factor = device_scale_factor;
229 overlay_processor_->ProcessForOverlays(
230 renderer_state, render_passes_in_draw_order, &frame.overlay_list);
229 } 231 }
230 232
231 for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) { 233 for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) {
232 RenderPass* pass = render_passes_in_draw_order->at(i); 234 RenderPass* pass = render_passes_in_draw_order->at(i);
233 DrawRenderPass(&frame, pass); 235 DrawRenderPass(&frame, pass);
234 236
235 for (ScopedPtrVector<CopyOutputRequest>::iterator it = 237 for (ScopedPtrVector<CopyOutputRequest>::iterator it =
236 pass->copy_requests.begin(); 238 pass->copy_requests.begin();
237 it != pass->copy_requests.end(); 239 it != pass->copy_requests.end();
238 ++it) { 240 ++it) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 ScopedResource* texture = render_pass_textures_.get(id); 522 ScopedResource* texture = render_pass_textures_.get(id);
521 return texture && texture->id(); 523 return texture && texture->id();
522 } 524 }
523 525
524 // static 526 // static
525 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 527 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
526 return render_pass->output_rect.size(); 528 return render_pass->output_rect.size();
527 } 529 }
528 530
529 } // namespace cc 531 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698