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

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

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 5 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
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return window_rect; 125 return window_rect;
126 } 126 }
127 127
128 DirectRenderer::DirectRenderer(RendererClient* client, 128 DirectRenderer::DirectRenderer(RendererClient* client,
129 const RendererSettings* settings, 129 const RendererSettings* settings,
130 OutputSurface* output_surface, 130 OutputSurface* output_surface,
131 ResourceProvider* resource_provider) 131 ResourceProvider* resource_provider)
132 : Renderer(client, settings), 132 : Renderer(client, settings),
133 output_surface_(output_surface), 133 output_surface_(output_surface),
134 resource_provider_(resource_provider), 134 resource_provider_(resource_provider),
135 overlay_processor_( 135 overlay_processor_(new OverlayProcessor(output_surface)) {
136 new OverlayProcessor(output_surface, resource_provider)) {
137 overlay_processor_->Initialize(); 136 overlay_processor_->Initialize();
138 } 137 }
139 138
140 DirectRenderer::~DirectRenderer() {} 139 DirectRenderer::~DirectRenderer() {}
141 140
142 void DirectRenderer::SetEnlargePassTextureAmountForTesting( 141 void DirectRenderer::SetEnlargePassTextureAmountForTesting(
143 const gfx::Vector2d& amount) { 142 const gfx::Vector2d& amount) {
144 enlarge_pass_texture_amount_ = amount; 143 enlarge_pass_texture_amount_ = amount;
145 } 144 }
146 145
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 ScopedResource* texture = render_pass_textures_.get(id); 519 ScopedResource* texture = render_pass_textures_.get(id);
521 return texture && texture->id(); 520 return texture && texture->id();
522 } 521 }
523 522
524 // static 523 // static
525 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 524 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
526 return render_pass->output_rect.size(); 525 return render_pass->output_rect.size();
527 } 526 }
528 527
529 } // namespace cc 528 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698