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

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

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 909e548229317c4bcb33c808427e72162135df73..922d7c73322bd94445b1abf6e5f013f703ddfaf6 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -78,7 +78,7 @@ PassRefPtr<DrawingBuffer> DrawingBuffer::create(
PreserveDrawingBuffer preserve,
WebGLVersion webGLVersion,
ChromiumImageUsage chromiumImageUsage) {
- ASSERT(contextProvider);
+ DCHECK(contextProvider);
if (shouldFailDrawingBufferCreationForTesting) {
shouldFailDrawingBufferCreationForTesting = false;
@@ -91,7 +91,7 @@ PassRefPtr<DrawingBuffer> DrawingBuffer::create(
// This might be the first time we notice that the GL context is lost.
return nullptr;
}
- ASSERT(extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil"));
+ DCHECK(extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil"));
extensionsUtil->ensureExtensionEnabled("GL_OES_packed_depth_stencil");
bool multisampleSupported =
wantAntialiasing && (extensionsUtil->supportsExtension(
@@ -185,7 +185,7 @@ void DrawingBuffer::setBufferClearNeeded(bool flag) {
if (m_preserveDrawingBuffer == Discard) {
m_bufferClearNeeded = flag;
} else {
- ASSERT(!m_bufferClearNeeded);
+ DCHECK(!m_bufferClearNeeded);
}
}
@@ -269,7 +269,7 @@ bool DrawingBuffer::prepareTextureMailboxInternal(
// 4. Here.
return false;
}
- ASSERT(!m_isHidden);
+ DCHECK(!m_isHidden);
if (!m_contentsChanged)
return false;
@@ -781,7 +781,7 @@ void DrawingBuffer::clearPlatformLayer() {
}
void DrawingBuffer::beginDestruction() {
- ASSERT(!m_destructionInProgress);
+ DCHECK(!m_destructionInProgress);
m_destructionInProgress = true;
clearPlatformLayer();
@@ -1046,7 +1046,7 @@ bool DrawingBuffer::paintRenderingResultsToImageData(
WTF::ArrayBufferContents& contents) {
ScopedStateRestorer scopedStateRestorer(this);
- ASSERT(!m_premultipliedAlpha);
+ DCHECK(!m_premultipliedAlpha);
width = size().width();
height = size().height();
@@ -1115,7 +1115,7 @@ void DrawingBuffer::readBackFramebuffer(unsigned char* pixels,
pixels[i + 2] = std::min(255, pixels[i + 2] * pixels[i + 3] / 255);
}
} else if (op != WebGLImageConversion::AlphaDoNothing) {
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
}

Powered by Google App Engine
This is Rietveld 408576698