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

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

Issue 780293002: gpu: fix gpu process crashed on win_blink_rel due to dcheck in CopyTextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "gpu/command_buffer/service/gl_utils.h" 10 #include "gpu/command_buffer/service/gl_utils.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 namespace gpu { 253 namespace gpu {
254 254
255 CopyTextureCHROMIUMResourceManager::CopyTextureCHROMIUMResourceManager() 255 CopyTextureCHROMIUMResourceManager::CopyTextureCHROMIUMResourceManager()
256 : initialized_(false), 256 : initialized_(false),
257 vertex_shaders_(NUM_VERTEX_SHADERS, 0u), 257 vertex_shaders_(NUM_VERTEX_SHADERS, 0u),
258 fragment_shaders_(NUM_FRAGMENT_SHADERS, 0u), 258 fragment_shaders_(NUM_FRAGMENT_SHADERS, 0u),
259 buffer_id_(0u), 259 buffer_id_(0u),
260 framebuffer_(0u) {} 260 framebuffer_(0u) {}
261 261
262 CopyTextureCHROMIUMResourceManager::~CopyTextureCHROMIUMResourceManager() { 262 CopyTextureCHROMIUMResourceManager::~CopyTextureCHROMIUMResourceManager() {
263 DCHECK(!buffer_id_);
Ken Russell (switch to Gerrit) 2014/12/05 18:59:28 Please add the comment here from the CL descriptio
264 DCHECK(!framebuffer_);
265 } 263 }
266 264
267 void CopyTextureCHROMIUMResourceManager::Initialize( 265 void CopyTextureCHROMIUMResourceManager::Initialize(
268 const gles2::GLES2Decoder* decoder) { 266 const gles2::GLES2Decoder* decoder) {
269 COMPILE_ASSERT( 267 COMPILE_ASSERT(
270 kVertexPositionAttrib == 0u, 268 kVertexPositionAttrib == 0u,
271 Position_attribs_must_be_0); 269 Position_attribs_must_be_0);
272 DCHECK(!buffer_id_); 270 DCHECK(!buffer_id_);
273 DCHECK(!framebuffer_); 271 DCHECK(!framebuffer_);
274 DCHECK(programs_.empty()); 272 DCHECK(programs_.empty());
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 decoder->RestoreTextureState(dest_id); 471 decoder->RestoreTextureState(dest_id);
474 decoder->RestoreTextureUnitBindings(0); 472 decoder->RestoreTextureUnitBindings(0);
475 decoder->RestoreActiveTexture(); 473 decoder->RestoreActiveTexture();
476 decoder->RestoreProgramBindings(); 474 decoder->RestoreProgramBindings();
477 decoder->RestoreBufferBindings(); 475 decoder->RestoreBufferBindings();
478 decoder->RestoreFramebufferBindings(); 476 decoder->RestoreFramebufferBindings();
479 decoder->RestoreGlobalState(); 477 decoder->RestoreGlobalState();
480 } 478 }
481 479
482 } // namespace gpu 480 } // 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