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

Side by Side Diff: gpu/command_buffer/service/framebuffer_manager.cc

Issue 1700433002: Complete disable_gl_rgb_format workaround for Mali-400 GPU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logic fixes from PS1 review comments 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/command_buffer/service/framebuffer_manager.h" 5 #include "gpu/command_buffer/service/framebuffer_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 bool Framebuffer::HasDepthAttachment() const { 465 bool Framebuffer::HasDepthAttachment() const {
466 return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() || 466 return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() ||
467 attachments_.find(GL_DEPTH_ATTACHMENT) != attachments_.end(); 467 attachments_.find(GL_DEPTH_ATTACHMENT) != attachments_.end();
468 } 468 }
469 469
470 bool Framebuffer::HasStencilAttachment() const { 470 bool Framebuffer::HasStencilAttachment() const {
471 return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() || 471 return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() ||
472 attachments_.find(GL_STENCIL_ATTACHMENT) != attachments_.end(); 472 attachments_.find(GL_STENCIL_ATTACHMENT) != attachments_.end();
473 } 473 }
474 474
475 GLenum Framebuffer::GetColorAttachment0Format() const {
476 AttachmentMap::const_iterator it = attachments_.find(GL_COLOR_ATTACHMENT0);
477 if (it == attachments_.end()) {
478 return 0;
479 }
480 const Attachment* attachment = it->second.get();
481 return attachment->internal_format();
482 }
483
475 GLenum Framebuffer::GetReadBufferInternalFormat() const { 484 GLenum Framebuffer::GetReadBufferInternalFormat() const {
476 if (read_buffer_ == GL_NONE) 485 if (read_buffer_ == GL_NONE)
477 return 0; 486 return 0;
478 AttachmentMap::const_iterator it = attachments_.find(read_buffer_); 487 AttachmentMap::const_iterator it = attachments_.find(read_buffer_);
479 if (it == attachments_.end()) { 488 if (it == attachments_.end()) {
480 return 0; 489 return 0;
481 } 490 }
482 const Attachment* attachment = it->second.get(); 491 const Attachment* attachment = it->second.get();
483 return attachment->internal_format(); 492 return attachment->internal_format();
484 } 493 }
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 793
785 bool FramebufferManager::IsComplete( 794 bool FramebufferManager::IsComplete(
786 Framebuffer* framebuffer) { 795 Framebuffer* framebuffer) {
787 DCHECK(framebuffer); 796 DCHECK(framebuffer);
788 return framebuffer->framebuffer_complete_state_count_id() == 797 return framebuffer->framebuffer_complete_state_count_id() ==
789 framebuffer_state_change_count_; 798 framebuffer_state_change_count_;
790 } 799 }
791 800
792 } // namespace gles2 801 } // namespace gles2
793 } // namespace gpu 802 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698