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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2126603004: Change ASSERT to CHECK in DrawingBuffer::reset for investigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 adjustedSize.setHeight(maxTextureSize); 732 adjustedSize.setHeight(maxTextureSize);
733 733
734 if (adjustedSize.width() > maxTextureSize) 734 if (adjustedSize.width() > maxTextureSize)
735 adjustedSize.setWidth(maxTextureSize); 735 adjustedSize.setWidth(maxTextureSize);
736 736
737 return adjustedSize; 737 return adjustedSize;
738 } 738 }
739 739
740 bool DrawingBuffer::reset(const IntSize& newSize) 740 bool DrawingBuffer::reset(const IntSize& newSize)
741 { 741 {
742 ASSERT(!newSize.isEmpty()); 742 CHECK(!newSize.isEmpty());
743 IntSize adjustedSize = adjustSize(newSize, m_size, m_maxTextureSize); 743 IntSize adjustedSize = adjustSize(newSize, m_size, m_maxTextureSize);
744 if (adjustedSize.isEmpty()) 744 if (adjustedSize.isEmpty())
745 return false; 745 return false;
746 746
747 if (adjustedSize != m_size) { 747 if (adjustedSize != m_size) {
748 do { 748 do {
749 if (!resizeDefaultFramebuffer(adjustedSize)) { 749 if (!resizeDefaultFramebuffer(adjustedSize)) {
750 adjustedSize.scale(s_resourceAdjustedRatio); 750 adjustedSize.scale(s_resourceAdjustedRatio);
751 continue; 751 continue;
752 } 752 }
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1088
1089 void DrawingBuffer::restoreTextureBindings() 1089 void DrawingBuffer::restoreTextureBindings()
1090 { 1090 {
1091 // This class potentially modifies the bindings for GL_TEXTURE_2D and 1091 // This class potentially modifies the bindings for GL_TEXTURE_2D and
1092 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since 1092 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since
1093 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1093 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1094 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1094 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1095 } 1095 }
1096 1096
1097 } // namespace blink 1097 } // namespace blink
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