| 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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 5866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5877 } | 5877 } |
| 5878 | 5878 |
| 5879 void GLES2DecoderImpl::PerformanceWarning( | 5879 void GLES2DecoderImpl::PerformanceWarning( |
| 5880 const char* filename, int line, const std::string& msg) { | 5880 const char* filename, int line, const std::string& msg) { |
| 5881 logger_.LogMessage(filename, line, | 5881 logger_.LogMessage(filename, line, |
| 5882 std::string("PERFORMANCE WARNING: ") + msg); | 5882 std::string("PERFORMANCE WARNING: ") + msg); |
| 5883 } | 5883 } |
| 5884 | 5884 |
| 5885 void GLES2DecoderImpl::DoWillUseTexImageIfNeeded( | 5885 void GLES2DecoderImpl::DoWillUseTexImageIfNeeded( |
| 5886 Texture* texture, GLenum textarget) { | 5886 Texture* texture, GLenum textarget) { |
| 5887 // This might be supported in the future. | |
| 5888 if (textarget != GL_TEXTURE_2D) | |
| 5889 return; | |
| 5890 // Image is already in use if texture is attached to a framebuffer. | 5887 // Image is already in use if texture is attached to a framebuffer. |
| 5891 if (texture && !texture->IsAttachedToFramebuffer()) { | 5888 if (texture && !texture->IsAttachedToFramebuffer()) { |
| 5892 gfx::GLImage* image = texture->GetLevelImage(textarget, 0); | 5889 gfx::GLImage* image = texture->GetLevelImage(textarget, 0); |
| 5893 if (image) { | 5890 if (image) { |
| 5894 ScopedGLErrorSuppressor suppressor( | 5891 ScopedGLErrorSuppressor suppressor( |
| 5895 "GLES2DecoderImpl::DoWillUseTexImageIfNeeded", | 5892 "GLES2DecoderImpl::DoWillUseTexImageIfNeeded", |
| 5896 GetErrorState()); | 5893 GetErrorState()); |
| 5897 glBindTexture(textarget, texture->service_id()); | 5894 glBindTexture(textarget, texture->service_id()); |
| 5898 image->WillUseTexImage(); | 5895 image->WillUseTexImage(); |
| 5899 RestoreCurrentTexture2DBindings(&state_); | 5896 RestoreCurrentTexture2DBindings(&state_); |
| (...skipping 4590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10490 DoDidUseTexImageIfNeeded(texture, texture->target()); | 10487 DoDidUseTexImageIfNeeded(texture, texture->target()); |
| 10491 } | 10488 } |
| 10492 | 10489 |
| 10493 // Include the auto-generated part of this file. We split this because it means | 10490 // Include the auto-generated part of this file. We split this because it means |
| 10494 // we can easily edit the non-auto generated parts right here in this file | 10491 // we can easily edit the non-auto generated parts right here in this file |
| 10495 // instead of having to edit some template or the code generator. | 10492 // instead of having to edit some template or the code generator. |
| 10496 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10493 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 10497 | 10494 |
| 10498 } // namespace gles2 | 10495 } // namespace gles2 |
| 10499 } // namespace gpu | 10496 } // namespace gpu |
| OLD | NEW |