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

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

Issue 10012057: Add GL_EXT_unpack_subimage support to command buffer client code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.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 #include "base/bits.h" 6 #include "base/bits.h"
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.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/feature_info.h" 9 #include "gpu/command_buffer/service/feature_info.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 info.level = level; 258 info.level = level;
259 info.internal_format = internal_format; 259 info.internal_format = internal_format;
260 info.width = width; 260 info.width = width;
261 info.height = height; 261 info.height = height;
262 info.depth = depth; 262 info.depth = depth;
263 info.border = border; 263 info.border = border;
264 info.format = format; 264 info.format = format;
265 info.type = type; 265 info.type = type;
266 266
267 estimated_size_ -= info.estimated_size; 267 estimated_size_ -= info.estimated_size;
268 GLES2Util::ComputeImageDataSize( 268 GLES2Util::ComputeImageDataSizes(
269 width, height, format, type, 4, &info.estimated_size); 269 width, height, format, type, 4, &info.estimated_size, NULL, NULL);
270 estimated_size_ += info.estimated_size; 270 estimated_size_ += info.estimated_size;
271 271
272 if (!info.cleared) { 272 if (!info.cleared) {
273 DCHECK_NE(0, num_uncleared_mips_); 273 DCHECK_NE(0, num_uncleared_mips_);
274 --num_uncleared_mips_; 274 --num_uncleared_mips_;
275 } 275 }
276 info.cleared = cleared; 276 info.cleared = cleared;
277 if (!info.cleared) { 277 if (!info.cleared) {
278 ++num_uncleared_mips_; 278 ++num_uncleared_mips_;
279 } 279 }
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 GLsizei TextureManager::ComputeMipMapCount( 909 GLsizei TextureManager::ComputeMipMapCount(
910 GLsizei width, GLsizei height, GLsizei depth) { 910 GLsizei width, GLsizei height, GLsizei depth) {
911 return 1 + base::bits::Log2Floor(std::max(std::max(width, height), depth)); 911 return 1 + base::bits::Log2Floor(std::max(std::max(width, height), depth));
912 } 912 }
913 913
914 914
915 } // namespace gles2 915 } // namespace gles2
916 } // namespace gpu 916 } // namespace gpu
917 917
918 918
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698