Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: gpu/command_buffer/service/texture_manager.cc

Issue 1057183002: Fix a few lints found while working on crrev.com/1051503003. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More lints removed. "git cl format" reverted. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 TextureRef* texture_ref; 1637 TextureRef* texture_ref;
1638 if (!ValidateTexImage2D(state, "glTexImage2D", args, &texture_ref)) { 1638 if (!ValidateTexImage2D(state, "glTexImage2D", args, &texture_ref)) {
1639 return; 1639 return;
1640 } 1640 }
1641 1641
1642 DoTexImage2D(texture_state, state->GetErrorState(), framebuffer_state, 1642 DoTexImage2D(texture_state, state->GetErrorState(), framebuffer_state,
1643 texture_ref, args); 1643 texture_ref, args);
1644 } 1644 }
1645 1645
1646 GLenum TextureManager::AdjustTexFormat(GLenum format) const { 1646 GLenum TextureManager::AdjustTexFormat(GLenum format) const {
1647 // TODO: GLES 3 allows for internal format and format to differ. This logic 1647 // TODO(bajones): GLES 3 allows for internal format and format to differ.
1648 // may need to change as a result. 1648 // This logic may need to change as a result.
1649 if (gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL) { 1649 if (gfx::GetGLImplementation() == gfx::kGLImplementationDesktopGL) {
1650 if (format == GL_SRGB_EXT) 1650 if (format == GL_SRGB_EXT)
1651 return GL_RGB; 1651 return GL_RGB;
1652 if (format == GL_SRGB_ALPHA_EXT) 1652 if (format == GL_SRGB_ALPHA_EXT)
1653 return GL_RGBA; 1653 return GL_RGBA;
1654 } 1654 }
1655 return format; 1655 return format;
1656 } 1656 }
1657 1657
1658 void TextureManager::DoTexImage2D( 1658 void TextureManager::DoTexImage2D(
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 } 1722 }
1723 1723
1724 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { 1724 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() {
1725 texture_state_->texture_upload_count++; 1725 texture_state_->texture_upload_count++;
1726 texture_state_->total_texture_upload_time += 1726 texture_state_->total_texture_upload_time +=
1727 base::TimeTicks::Now() - begin_time_; 1727 base::TimeTicks::Now() - begin_time_;
1728 } 1728 }
1729 1729
1730 } // namespace gles2 1730 } // namespace gles2
1731 } // namespace gpu 1731 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698