| 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 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 9 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
| 10 #include "gpu/command_buffer/service/texture_manager.h" | 10 #include "gpu/command_buffer/service/texture_manager.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual GLenum internal_format() const OVERRIDE { | 50 virtual GLenum internal_format() const OVERRIDE { |
| 51 return renderbuffer_->internal_format(); | 51 return renderbuffer_->internal_format(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual GLsizei samples() const OVERRIDE { | 54 virtual GLsizei samples() const OVERRIDE { |
| 55 return renderbuffer_->samples(); | 55 return renderbuffer_->samples(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual GLuint object_name() const OVERRIDE { |
| 59 return renderbuffer_->client_id(); |
| 60 } |
| 61 |
| 58 virtual bool cleared() const OVERRIDE { | 62 virtual bool cleared() const OVERRIDE { |
| 59 return renderbuffer_->cleared(); | 63 return renderbuffer_->cleared(); |
| 60 } | 64 } |
| 61 | 65 |
| 62 virtual void SetCleared( | 66 virtual void SetCleared( |
| 63 RenderbufferManager* renderbuffer_manager, | 67 RenderbufferManager* renderbuffer_manager, |
| 64 TextureManager* /* texture_manager */, | 68 TextureManager* /* texture_manager */, |
| 65 bool cleared) OVERRIDE { | 69 bool cleared) OVERRIDE { |
| 66 renderbuffer_manager->SetCleared(renderbuffer_, cleared); | 70 renderbuffer_manager->SetCleared(renderbuffer_, cleared); |
| 67 } | 71 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 GLenum temp_internal_format = 0; | 146 GLenum temp_internal_format = 0; |
| 143 texture_ref_->texture()->GetLevelType( | 147 texture_ref_->texture()->GetLevelType( |
| 144 target_, level_, &temp_type, &temp_internal_format); | 148 target_, level_, &temp_type, &temp_internal_format); |
| 145 return temp_internal_format; | 149 return temp_internal_format; |
| 146 } | 150 } |
| 147 | 151 |
| 148 virtual GLsizei samples() const OVERRIDE { | 152 virtual GLsizei samples() const OVERRIDE { |
| 149 return 0; | 153 return 0; |
| 150 } | 154 } |
| 151 | 155 |
| 156 virtual GLuint object_name() const OVERRIDE { |
| 157 return texture_ref_->client_id(); |
| 158 } |
| 159 |
| 152 virtual bool cleared() const OVERRIDE { | 160 virtual bool cleared() const OVERRIDE { |
| 153 return texture_ref_->texture()->IsLevelCleared(target_, level_); | 161 return texture_ref_->texture()->IsLevelCleared(target_, level_); |
| 154 } | 162 } |
| 155 | 163 |
| 156 virtual void SetCleared( | 164 virtual void SetCleared( |
| 157 RenderbufferManager* /* renderbuffer_manager */, | 165 RenderbufferManager* /* renderbuffer_manager */, |
| 158 TextureManager* texture_manager, | 166 TextureManager* texture_manager, |
| 159 bool cleared) OVERRIDE { | 167 bool cleared) OVERRIDE { |
| 160 texture_manager->SetLevelCleared(texture_ref_, target_, level_, cleared); | 168 texture_manager->SetLevelCleared(texture_ref_, target_, level_, cleared); |
| 161 } | 169 } |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 Framebuffer* framebuffer) { | 584 Framebuffer* framebuffer) { |
| 577 DCHECK(framebuffer); | 585 DCHECK(framebuffer); |
| 578 return framebuffer->framebuffer_complete_state_count_id() == | 586 return framebuffer->framebuffer_complete_state_count_id() == |
| 579 framebuffer_state_change_count_; | 587 framebuffer_state_change_count_; |
| 580 } | 588 } |
| 581 | 589 |
| 582 } // namespace gles2 | 590 } // namespace gles2 |
| 583 } // namespace gpu | 591 } // namespace gpu |
| 584 | 592 |
| 585 | 593 |
| OLD | NEW |