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

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

Issue 1643653002: cc: make partially-resident textures use 1 - y, not h - y. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More plausible mask fix; new test Created 4 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 | « no previous file | cc/output/gl_renderer.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 <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 if (!texture->id()) { 543 if (!texture->id()) {
544 texture->Allocate(size, 544 texture->Allocate(size,
545 ResourceProvider::TEXTURE_HINT_IMMUTABLE_FRAMEBUFFER, 545 ResourceProvider::TEXTURE_HINT_IMMUTABLE_FRAMEBUFFER,
546 resource_provider_->best_texture_format()); 546 resource_provider_->best_texture_format());
547 } 547 }
548 DCHECK(texture->id()); 548 DCHECK(texture->id());
549 549
550 if (BindFramebufferToTexture(frame, texture)) { 550 if (BindFramebufferToTexture(frame, texture)) {
551 InitializeViewport(frame, render_pass->output_rect, 551 InitializeViewport(frame, render_pass->output_rect,
552 gfx::Rect(render_pass->output_rect.size()), 552 gfx::Rect(render_pass->output_rect.size()),
553 render_pass->output_rect.size()); 553 texture->size());
554 return true; 554 return true;
555 } 555 }
556 556
557 return false; 557 return false;
558 } 558 }
559 559
560 bool DirectRenderer::HasAllocatedResourcesForTesting(RenderPassId id) const { 560 bool DirectRenderer::HasAllocatedResourcesForTesting(RenderPassId id) const {
561 ScopedResource* texture = render_pass_textures_.get(id); 561 ScopedResource* texture = render_pass_textures_.get(id);
562 return texture && texture->id(); 562 return texture && texture->id();
563 } 563 }
564 564
565 // static 565 // static
566 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 566 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
567 return render_pass->output_rect.size(); 567 return render_pass->output_rect.size();
568 } 568 }
569 569
570 } // namespace cc 570 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698