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

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

Issue 1925663002: command_buffer: Defer restoring of FBO bindings when changing virtual contexts Base URL: https://chromium.googlesource.com/chromium/src.git@lazy-bindframebuffer-03-copy-texture-chromium-instantiation
Patch Set: rework Created 4 years, 7 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 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2751 // Just set the level texture but mark the texture as uncleared. 2751 // Just set the level texture but mark the texture as uncleared.
2752 SetLevelInfo( 2752 SetLevelInfo(
2753 texture_ref, args.target, args.level, args.internal_format, args.width, 2753 texture_ref, args.target, args.level, args.internal_format, args.width,
2754 args.height, args.depth, args.border, args.format, args.type, 2754 args.height, args.depth, args.border, args.format, args.type,
2755 gfx::Rect()); 2755 gfx::Rect());
2756 texture_state->tex_image_failed = false; 2756 texture_state->tex_image_failed = false;
2757 return; 2757 return;
2758 } 2758 }
2759 2759
2760 if (texture->IsAttachedToFramebuffer()) { 2760 if (texture->IsAttachedToFramebuffer()) {
2761 framebuffer_state->clear_state_dirty = true; 2761 framebuffer_state->NotifyBoundFramebuffersChanged();
2762 } 2762 }
2763 2763
2764 if (texture_state->texsubimage_faster_than_teximage && 2764 if (texture_state->texsubimage_faster_than_teximage &&
2765 level_is_same && args.pixels && !unpack_buffer_bound) { 2765 level_is_same && args.pixels && !unpack_buffer_bound) {
2766 { 2766 {
2767 ScopedTextureUploadTimer timer(texture_state); 2767 ScopedTextureUploadTimer timer(texture_state);
2768 if (args.command_type == DoTexImageArguments::kTexImage3D) { 2768 if (args.command_type == DoTexImageArguments::kTexImage3D) {
2769 glTexSubImage3D(args.target, args.level, 0, 0, 0, 2769 glTexSubImage3D(args.target, args.level, 0, 0, 0,
2770 args.width, args.height, args.depth, 2770 args.width, args.height, args.depth,
2771 args.format, args.type, args.pixels); 2771 args.format, args.type, args.pixels);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 uint32_t TextureManager::GetServiceIdGeneration() const { 3172 uint32_t TextureManager::GetServiceIdGeneration() const {
3173 return current_service_id_generation_; 3173 return current_service_id_generation_;
3174 } 3174 }
3175 3175
3176 void TextureManager::IncrementServiceIdGeneration() { 3176 void TextureManager::IncrementServiceIdGeneration() {
3177 current_service_id_generation_++; 3177 current_service_id_generation_++;
3178 } 3178 }
3179 3179
3180 } // namespace gles2 3180 } // namespace gles2
3181 } // namespace gpu 3181 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698