| OLD | NEW |
| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 attachment_type, max_color_attachments); | 262 attachment_type, max_color_attachments); |
| 263 DCHECK_NE(0u, need); | 263 DCHECK_NE(0u, need); |
| 264 uint32_t have = GLES2Util::GetChannelsForFormat(internal_format); | 264 uint32_t have = GLES2Util::GetChannelsForFormat(internal_format); |
| 265 | 265 |
| 266 // Workaround for NVIDIA drivers that incorrectly expose these formats as | 266 // Workaround for NVIDIA drivers that incorrectly expose these formats as |
| 267 // renderable: | 267 // renderable: |
| 268 if (internal_format == GL_LUMINANCE || internal_format == GL_ALPHA || | 268 if (internal_format == GL_LUMINANCE || internal_format == GL_ALPHA || |
| 269 internal_format == GL_LUMINANCE_ALPHA) { | 269 internal_format == GL_LUMINANCE_ALPHA) { |
| 270 return false; | 270 return false; |
| 271 } | 271 } |
| 272 // Disallow RGB16F, because it is only supported in ES2 and not ES3. |
| 273 if (internal_format == GL_RGB16F) { |
| 274 return false; |
| 275 } |
| 272 return (need & have) != 0; | 276 return (need & have) != 0; |
| 273 } | 277 } |
| 274 | 278 |
| 275 size_t GetSignatureSize(TextureManager* texture_manager) const override { | 279 size_t GetSignatureSize(TextureManager* texture_manager) const override { |
| 276 return texture_manager->GetSignatureSize(); | 280 return texture_manager->GetSignatureSize(); |
| 277 } | 281 } |
| 278 | 282 |
| 279 void AddToSignature(TextureManager* texture_manager, | 283 void AddToSignature(TextureManager* texture_manager, |
| 280 std::string* signature) const override { | 284 std::string* signature) const override { |
| 281 DCHECK(signature); | 285 DCHECK(signature); |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 | 1072 |
| 1069 bool FramebufferManager::IsComplete( | 1073 bool FramebufferManager::IsComplete( |
| 1070 Framebuffer* framebuffer) { | 1074 Framebuffer* framebuffer) { |
| 1071 DCHECK(framebuffer); | 1075 DCHECK(framebuffer); |
| 1072 return framebuffer->framebuffer_complete_state_count_id() == | 1076 return framebuffer->framebuffer_complete_state_count_id() == |
| 1073 framebuffer_state_change_count_; | 1077 framebuffer_state_change_count_; |
| 1074 } | 1078 } |
| 1075 | 1079 |
| 1076 } // namespace gles2 | 1080 } // namespace gles2 |
| 1077 } // namespace gpu | 1081 } // namespace gpu |
| OLD | NEW |