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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 info.width = width; 619 info.width = width;
620 info.height = height; 620 info.height = height;
621 info.depth = depth; 621 info.depth = depth;
622 info.border = border; 622 info.border = border;
623 info.format = format; 623 info.format = format;
624 info.type = type; 624 info.type = type;
625 info.image = 0; 625 info.image = 0;
626 626
627 estimated_size_ -= info.estimated_size; 627 estimated_size_ -= info.estimated_size;
628 GLES2Util::ComputeImageDataSizes( 628 GLES2Util::ComputeImageDataSizes(
629 width, height, format, type, 4, &info.estimated_size, NULL, NULL); 629 width, height, 1, format, type, 4, &info.estimated_size, NULL, NULL);
630 estimated_size_ += info.estimated_size; 630 estimated_size_ += info.estimated_size;
631 631
632 UpdateMipCleared(&info, cleared); 632 UpdateMipCleared(&info, cleared);
633 max_level_set_ = std::max(max_level_set_, level); 633 max_level_set_ = std::max(max_level_set_, level);
634 Update(feature_info); 634 Update(feature_info);
635 UpdateCleared(); 635 UpdateCleared();
636 UpdateCanRenderCondition(); 636 UpdateCanRenderCondition();
637 UpdateHasImages(); 637 UpdateHasImages();
638 if (IsAttachedToFramebuffer()) { 638 if (IsAttachedToFramebuffer()) {
639 // TODO(gman): If textures tracked which framebuffers they were attached to 639 // TODO(gman): If textures tracked which framebuffers they were attached to
(...skipping 1082 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::HighResNow() - begin_time_; 1727 base::TimeTicks::HighResNow() - 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/test_helper.cc ('k') | gpu/tools/compositor_model_bench/compositor_model_bench.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698