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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « cc/layers/video_layer_impl.cc ('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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 402 }
403 403
404 ScopedResource* texture = render_pass_textures_.get(render_pass->id); 404 ScopedResource* texture = render_pass_textures_.get(render_pass->id);
405 DCHECK(texture); 405 DCHECK(texture);
406 406
407 gfx::Size size = RenderPassTextureSize(render_pass); 407 gfx::Size size = RenderPassTextureSize(render_pass);
408 size.Enlarge(enlarge_pass_texture_amount_.x(), 408 size.Enlarge(enlarge_pass_texture_amount_.x(),
409 enlarge_pass_texture_amount_.y()); 409 enlarge_pass_texture_amount_.y());
410 if (!texture->id()) 410 if (!texture->id())
411 texture->Allocate( 411 texture->Allocate(
412 size, ResourceProvider::TEXTURE_HINT_IMMUTABLE_FRAMEBUFFER, RGBA_8888); 412 size, ResourceProvider::TextureHintImmutableFramebuffer, RGBA_8888);
413 DCHECK(texture->id()); 413 DCHECK(texture->id());
414 414
415 return BindFramebufferToTexture(frame, texture, render_pass->output_rect); 415 return BindFramebufferToTexture(frame, texture, render_pass->output_rect);
416 } 416 }
417 417
418 bool DirectRenderer::HasAllocatedResourcesForTesting(RenderPassId id) const { 418 bool DirectRenderer::HasAllocatedResourcesForTesting(RenderPassId id) const {
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/layers/video_layer_impl.cc ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698