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

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

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: onemore Created 4 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
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/output/gl_renderer_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/output/direct_renderer.h" 5 #include "cc/output/direct_renderer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (!resource) 194 if (!resource)
195 resource = ScopedResource::Create(resource_provider_); 195 resource = ScopedResource::Create(resource_provider_);
196 } 196 }
197 } 197 }
198 198
199 void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order, 199 void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
200 float device_scale_factor, 200 float device_scale_factor,
201 const gfx::ColorSpace& device_color_space, 201 const gfx::ColorSpace& device_color_space,
202 const gfx::Rect& device_viewport_rect, 202 const gfx::Rect& device_viewport_rect,
203 const gfx::Rect& device_clip_rect) { 203 const gfx::Rect& device_clip_rect) {
204 DCHECK(visible());
204 TRACE_EVENT0("cc", "DirectRenderer::DrawFrame"); 205 TRACE_EVENT0("cc", "DirectRenderer::DrawFrame");
205 UMA_HISTOGRAM_COUNTS( 206 UMA_HISTOGRAM_COUNTS(
206 "Renderer4.renderPassCount", 207 "Renderer4.renderPassCount",
207 base::saturated_cast<int>(render_passes_in_draw_order->size())); 208 base::saturated_cast<int>(render_passes_in_draw_order->size()));
208 209
209 RenderPass* root_render_pass = render_passes_in_draw_order->back().get(); 210 RenderPass* root_render_pass = render_passes_in_draw_order->back().get();
210 DCHECK(root_render_pass); 211 DCHECK(root_render_pass);
211 212
212 DrawingFrame frame; 213 DrawingFrame frame;
213 frame.render_passes_in_draw_order = render_passes_in_draw_order; 214 frame.render_passes_in_draw_order = render_passes_in_draw_order;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 auto iter = render_pass_textures_.find(id); 572 auto iter = render_pass_textures_.find(id);
572 return iter != render_pass_textures_.end() && iter->second->id(); 573 return iter != render_pass_textures_.end() && iter->second->id();
573 } 574 }
574 575
575 // static 576 // static
576 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 577 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
577 return render_pass->output_rect.size(); 578 return render_pass->output_rect.size();
578 } 579 }
579 580
580 } // namespace cc 581 } // namespace cc
OLDNEW
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698