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

Unified Diff: gpu/command_buffer/service/framebuffer_manager.cc

Issue 7158002: Revert 89002 - Enforce RGB even on buggy drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/framebuffer_manager.cc
===================================================================
--- gpu/command_buffer/service/framebuffer_manager.cc (revision 89013)
+++ gpu/command_buffer/service/framebuffer_manager.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -43,10 +43,6 @@
render_buffer_->set_cleared();
}
- virtual bool IsTexture(TextureManager::TextureInfo* /* texture */) const {
- return false;
- }
-
RenderbufferManager::RenderbufferInfo* render_buffer() const {
return render_buffer_.get();
}
@@ -103,10 +99,6 @@
NOTREACHED();
}
- virtual bool IsTexture(TextureManager::TextureInfo* texture) const {
- return texture == texture_.get();
- }
-
TextureManager::TextureInfo* texture() const {
return texture_.get();
}
@@ -177,25 +169,6 @@
}
}
-bool FramebufferManager::FramebufferInfo::HasDepthAttachment() const {
- return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() ||
- attachments_.find(GL_DEPTH_ATTACHMENT) != attachments_.end();
-}
-
-bool FramebufferManager::FramebufferInfo::HasStencilAttachment() const {
- return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() ||
- attachments_.find(GL_STENCIL_ATTACHMENT) != attachments_.end();
-}
-
-GLenum FramebufferManager::FramebufferInfo::GetColorAttachmentFormat() const {
- AttachmentMap::const_iterator it = attachments_.find(GL_COLOR_ATTACHMENT0);
- if (it == attachments_.end()) {
- return 0;
- }
- const Attachment* attachment = it->second;
- return attachment->internal_format();
-}
-
bool FramebufferManager::FramebufferInfo::IsNotComplete() const {
for (AttachmentMap::const_iterator it = attachments_.begin();
it != attachments_.end(); ++it) {
@@ -242,14 +215,9 @@
attachment == GL_DEPTH_ATTACHMENT ||
attachment == GL_STENCIL_ATTACHMENT ||
attachment == GL_DEPTH_STENCIL_ATTACHMENT);
- const Attachment* a = GetAttachment(attachment);
- if (a && a->IsTexture(texture)) {
- texture->DetachFromFramebuffer();
- }
if (texture) {
attachments_[attachment] = Attachment::Ref(
new TextureAttachment(texture, target, level));
- texture->AttachToFramebuffer();
} else {
attachments_.erase(attachment);
}
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/framebuffer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698