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

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

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback: Adding UpdatePictureBufferSize to strategy Created 4 years, 9 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 (*it)->manager()->UpdateSafeToRenderFrom(delta); 771 (*it)->manager()->UpdateSafeToRenderFrom(delta);
772 } 772 }
773 773
774 void Texture::UpdateMipCleared(LevelInfo* info, 774 void Texture::UpdateMipCleared(LevelInfo* info,
775 GLsizei width, 775 GLsizei width,
776 GLsizei height, 776 GLsizei height,
777 const gfx::Rect& cleared_rect) { 777 const gfx::Rect& cleared_rect) {
778 bool was_cleared = info->cleared_rect == gfx::Rect(info->width, info->height); 778 bool was_cleared = info->cleared_rect == gfx::Rect(info->width, info->height);
779 info->width = width; 779 info->width = width;
780 info->height = height; 780 info->height = height;
781 LOG(ERROR) << __FUNCTION__ << " was_cleared:" << was_cleared
782 << " orig:" << info->cleared_rect.ToString()
783 << " new:" << cleared_rect.ToString();
781 info->cleared_rect = cleared_rect; 784 info->cleared_rect = cleared_rect;
782 bool cleared = info->cleared_rect == gfx::Rect(info->width, info->height); 785 bool cleared = info->cleared_rect == gfx::Rect(info->width, info->height);
783 if (cleared == was_cleared) 786 if (cleared == was_cleared)
784 return; 787 return;
785 int delta = cleared ? -1 : +1; 788 int delta = cleared ? -1 : +1;
786 num_uncleared_mips_ += delta; 789 num_uncleared_mips_ += delta;
787 for (RefSet::iterator it = refs_.begin(); it != refs_.end(); ++it) 790 for (RefSet::iterator it = refs_.begin(); it != refs_.end(); ++it)
788 (*it)->manager()->UpdateUnclearedMips(delta); 791 (*it)->manager()->UpdateUnclearedMips(delta);
789 } 792 }
790 793
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 num_npot_faces_ += now_npot ? 1 : -1; 903 num_npot_faces_ += now_npot ? 1 : -1;
901 } 904 }
902 905
903 // Signify that at least one of the mips has changed. 906 // Signify that at least one of the mips has changed.
904 texture_mips_dirty_ = true; 907 texture_mips_dirty_ = true;
905 } 908 }
906 909
907 info.target = target; 910 info.target = target;
908 info.level = level; 911 info.level = level;
909 info.internal_format = internal_format; 912 info.internal_format = internal_format;
913 LOG(ERROR) << __FUNCTION__ << " depth was:" << info.depth;
910 info.depth = depth; 914 info.depth = depth;
911 info.border = border; 915 info.border = border;
912 info.format = format; 916 info.format = format;
913 info.type = type; 917 info.type = type;
914 info.image = 0; 918 info.image = 0;
915 info.stream_texture_image = 0; 919 info.stream_texture_image = 0;
916 info.image_state = UNBOUND; 920 info.image_state = UNBOUND;
917 info.internal_workaround = false; 921 info.internal_workaround = false;
918 922
919 UpdateMipCleared(&info, width, height, cleared_rect); 923 UpdateMipCleared(&info, width, height, cleared_rect);
(...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 uint32_t TextureManager::GetServiceIdGeneration() const { 2811 uint32_t TextureManager::GetServiceIdGeneration() const {
2808 return current_service_id_generation_; 2812 return current_service_id_generation_;
2809 } 2813 }
2810 2814
2811 void TextureManager::IncrementServiceIdGeneration() { 2815 void TextureManager::IncrementServiceIdGeneration() {
2812 current_service_id_generation_++; 2816 current_service_id_generation_++;
2813 } 2817 }
2814 2818
2815 } // namespace gles2 2819 } // namespace gles2
2816 } // namespace gpu 2820 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698