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

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

Issue 1873393002: Fix VAO restore in CopyTextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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 | « no previous file | 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/gles2_cmd_copy_texture_chromium.h" 5 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 1.0f, 1.0f, 361 1.0f, 1.0f,
362 -1.0f, 1.0f}; 362 -1.0f, 1.0f};
363 glBufferData( 363 glBufferData(
364 GL_ARRAY_BUFFER, sizeof(kQuadVertices), kQuadVertices, GL_STATIC_DRAW); 364 GL_ARRAY_BUFFER, sizeof(kQuadVertices), kQuadVertices, GL_STATIC_DRAW);
365 365
366 glGenFramebuffersEXT(1, &framebuffer_); 366 glGenFramebuffersEXT(1, &framebuffer_);
367 367
368 if (vertex_array_object_id_) { 368 if (vertex_array_object_id_) {
369 glEnableVertexAttribArray(kVertexPositionAttrib); 369 glEnableVertexAttribArray(kVertexPositionAttrib);
370 glVertexAttribPointer(kVertexPositionAttrib, 2, GL_FLOAT, GL_FALSE, 0, 0); 370 glVertexAttribPointer(kVertexPositionAttrib, 2, GL_FLOAT, GL_FALSE, 0, 0);
371 decoder->RestoreAllAttributes();
371 } 372 }
372 373
373 decoder->RestoreAllAttributes();
374 decoder->RestoreBufferBindings(); 374 decoder->RestoreBufferBindings();
375 375
376 initialized_ = true; 376 initialized_ = true;
377 } 377 }
378 378
379 void CopyTextureCHROMIUMResourceManager::Destroy() { 379 void CopyTextureCHROMIUMResourceManager::Destroy() {
380 if (!initialized_) 380 if (!initialized_)
381 return; 381 return;
382 382
383 if (vertex_array_object_id_) { 383 if (vertex_array_object_id_) {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 decoder->RestoreTextureState(dest_id); 726 decoder->RestoreTextureState(dest_id);
727 decoder->RestoreTextureUnitBindings(0); 727 decoder->RestoreTextureUnitBindings(0);
728 decoder->RestoreActiveTexture(); 728 decoder->RestoreActiveTexture();
729 decoder->RestoreProgramBindings(); 729 decoder->RestoreProgramBindings();
730 decoder->RestoreBufferBindings(); 730 decoder->RestoreBufferBindings();
731 decoder->RestoreFramebufferBindings(); 731 decoder->RestoreFramebufferBindings();
732 decoder->RestoreGlobalState(); 732 decoder->RestoreGlobalState();
733 } 733 }
734 734
735 } // namespace gpu 735 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698