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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('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 <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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const gfx::Rect& draw_rect) const { 118 const gfx::Rect& draw_rect) const {
119 gfx::Rect window_rect = draw_rect; 119 gfx::Rect window_rect = draw_rect;
120 window_rect -= current_draw_rect_.OffsetFromOrigin(); 120 window_rect -= current_draw_rect_.OffsetFromOrigin();
121 window_rect += current_viewport_rect_.OffsetFromOrigin(); 121 window_rect += current_viewport_rect_.OffsetFromOrigin();
122 if (FlippedFramebuffer(frame)) 122 if (FlippedFramebuffer(frame))
123 window_rect.set_y(current_surface_size_.height() - window_rect.bottom()); 123 window_rect.set_y(current_surface_size_.height() - window_rect.bottom());
124 return window_rect; 124 return window_rect;
125 } 125 }
126 126
127 DirectRenderer::DirectRenderer(RendererClient* client, 127 DirectRenderer::DirectRenderer(RendererClient* client,
128 const LayerTreeSettings* settings, 128 const RendererSettings* settings,
129 OutputSurface* output_surface, 129 OutputSurface* output_surface,
130 ResourceProvider* resource_provider) 130 ResourceProvider* resource_provider)
131 : Renderer(client, settings), 131 : Renderer(client, settings),
132 output_surface_(output_surface), 132 output_surface_(output_surface),
133 resource_provider_(resource_provider), 133 resource_provider_(resource_provider),
134 overlay_processor_( 134 overlay_processor_(
135 new OverlayProcessor(output_surface, resource_provider)) { 135 new OverlayProcessor(output_surface, resource_provider)) {
136 overlay_processor_->Initialize(); 136 overlay_processor_->Initialize();
137 } 137 }
138 138
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 ScopedResource* texture = render_pass_textures_.get(id); 419 ScopedResource* texture = render_pass_textures_.get(id);
420 return texture && texture->id(); 420 return texture && texture->id();
421 } 421 }
422 422
423 // static 423 // static
424 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 424 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
425 return render_pass->output_rect.size(); 425 return render_pass->output_rect.size();
426 } 426 }
427 427
428 } // namespace cc 428 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698