Chromium Code Reviews| 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/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bits.h" | 10 #include "base/bits.h" |
| (...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1285 | 1285 |
| 1286 void TextureManager::SetParameterf( | 1286 void TextureManager::SetParameterf( |
| 1287 const char* function_name, ErrorState* error_state, | 1287 const char* function_name, ErrorState* error_state, |
| 1288 TextureRef* ref, GLenum pname, GLfloat param) { | 1288 TextureRef* ref, GLenum pname, GLfloat param) { |
| 1289 DCHECK(error_state); | 1289 DCHECK(error_state); |
| 1290 DCHECK(ref); | 1290 DCHECK(ref); |
| 1291 Texture* texture = ref->texture(); | 1291 Texture* texture = ref->texture(); |
| 1292 GLenum result = texture->SetParameterf(feature_info_.get(), pname, param); | 1292 GLenum result = texture->SetParameterf(feature_info_.get(), pname, param); |
| 1293 if (result != GL_NO_ERROR) { | 1293 if (result != GL_NO_ERROR) { |
| 1294 if (result == GL_INVALID_ENUM) { | 1294 if (result == GL_INVALID_ENUM) { |
| 1295 ERRORSTATE_SET_GL_ERROR_INVALID_ENUM( | 1295 ERRORSTATE_SET_GL_ERROR_INVALID_ENUM(error_state, function_name, |
| 1296 error_state, function_name, param, "param"); | 1296 static_cast<unsigned int>(param), |
|
no sievers
2014/10/16 23:52:08
I think this is a typo here. If the error is INVAL
Peter Kasting
2014/10/17 00:00:40
So, like this?:
ERRORSTATE_SET_GL_ERROR_INV
no sievers
2014/10/17 00:06:24
Yes.
| |
| 1297 "param"); | |
| 1297 } else { | 1298 } else { |
| 1298 ERRORSTATE_SET_GL_ERROR_INVALID_PARAMF( | 1299 ERRORSTATE_SET_GL_ERROR_INVALID_PARAMF( |
| 1299 error_state, result, function_name, pname, param); | 1300 error_state, result, function_name, pname, param); |
| 1300 } | 1301 } |
| 1301 } else { | 1302 } else { |
| 1302 // Texture tracking pools exist only for the command decoder, so | 1303 // Texture tracking pools exist only for the command decoder, so |
| 1303 // do not pass them on to the native GL implementation. | 1304 // do not pass them on to the native GL implementation. |
| 1304 if (pname != GL_TEXTURE_POOL_CHROMIUM) { | 1305 if (pname != GL_TEXTURE_POOL_CHROMIUM) { |
| 1305 glTexParameterf(texture->target(), pname, param); | 1306 glTexParameterf(texture->target(), pname, param); |
| 1306 } | 1307 } |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1720 } | 1721 } |
| 1721 | 1722 |
| 1722 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { | 1723 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { |
| 1723 texture_state_->texture_upload_count++; | 1724 texture_state_->texture_upload_count++; |
| 1724 texture_state_->total_texture_upload_time += | 1725 texture_state_->total_texture_upload_time += |
| 1725 base::TimeTicks::HighResNow() - begin_time_; | 1726 base::TimeTicks::HighResNow() - begin_time_; |
| 1726 } | 1727 } |
| 1727 | 1728 |
| 1728 } // namespace gles2 | 1729 } // namespace gles2 |
| 1729 } // namespace gpu | 1730 } // namespace gpu |
| OLD | NEW |