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 <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 8202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8213 void GLES2DecoderImpl::PerformanceWarning( | 8213 void GLES2DecoderImpl::PerformanceWarning( |
8214 const char* filename, int line, const std::string& msg) { | 8214 const char* filename, int line, const std::string& msg) { |
8215 logger_.LogMessage(filename, line, | 8215 logger_.LogMessage(filename, line, |
8216 std::string("PERFORMANCE WARNING: ") + msg); | 8216 std::string("PERFORMANCE WARNING: ") + msg); |
8217 } | 8217 } |
8218 | 8218 |
8219 void GLES2DecoderImpl::DoCopyTexImage(Texture* texture, | 8219 void GLES2DecoderImpl::DoCopyTexImage(Texture* texture, |
8220 GLenum textarget, | 8220 GLenum textarget, |
8221 gl::GLImage* image) { | 8221 gl::GLImage* image) { |
8222 // Note: We update the state to COPIED prior to calling CopyTexImage() | 8222 // Note: We update the state to COPIED prior to calling CopyTexImage() |
8223 // as that allows the GLImage implemenatation to set it back to UNBOUND | 8223 // as that allows the GLImage implementation to set it back to UNBOUND |
8224 // and ensure that CopyTexImage() is called each time the texture is | 8224 // and ensure that CopyTexImage() is called each time the texture is |
8225 // used. | 8225 // used. |
8226 texture->SetLevelImage(textarget, 0, image, Texture::COPIED); | 8226 texture->SetLevelImage(textarget, 0, image, Texture::COPIED); |
8227 bool rv = image->CopyTexImage(textarget); | 8227 bool rv = image->CopyTexImage(textarget); |
8228 DCHECK(rv) << "Both BindTexImage() and CopyTexImage() failed"; | 8228 DCHECK(rv) << "Both BindTexImage() and CopyTexImage() failed"; |
8229 } | 8229 } |
8230 | 8230 |
8231 void GLES2DecoderImpl::DoCopyTexImageIfNeeded(Texture* texture, | 8231 void GLES2DecoderImpl::DoCopyTexImageIfNeeded(Texture* texture, |
8232 GLenum textarget) { | 8232 GLenum textarget) { |
8233 // Image is already in use if texture is attached to a framebuffer. | 8233 // Image is already in use if texture is attached to a framebuffer. |
(...skipping 8682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16916 } | 16916 } |
16917 | 16917 |
16918 // Include the auto-generated part of this file. We split this because it means | 16918 // Include the auto-generated part of this file. We split this because it means |
16919 // we can easily edit the non-auto generated parts right here in this file | 16919 // we can easily edit the non-auto generated parts right here in this file |
16920 // instead of having to edit some template or the code generator. | 16920 // instead of having to edit some template or the code generator. |
16921 #include "base/macros.h" | 16921 #include "base/macros.h" |
16922 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 16922 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
16923 | 16923 |
16924 } // namespace gles2 | 16924 } // namespace gles2 |
16925 } // namespace gpu | 16925 } // namespace gpu |
OLD | NEW |