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

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

Issue 2567733002: replace flaky DCHECK in DrawingBuffer with early-out (Closed)
Patch Set: add comment + rebase Created 4 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 | « content/test/gpu/gpu_tests/webgl_conformance_expectations.py ('k') | 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 } else { 706 } else {
707 target = m_backColorBuffer->parameters.target; 707 target = m_backColorBuffer->parameters.target;
708 m_gl->GenMailboxCHROMIUM(mailbox.name); 708 m_gl->GenMailboxCHROMIUM(mailbox.name);
709 m_gl->ProduceTextureDirectCHROMIUM(m_backColorBuffer->textureId, target, 709 m_gl->ProduceTextureDirectCHROMIUM(m_backColorBuffer->textureId, target,
710 mailbox.name); 710 mailbox.name);
711 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); 711 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM();
712 m_gl->Flush(); 712 m_gl->Flush();
713 m_gl->GenSyncTokenCHROMIUM(fenceSync, produceSyncToken.GetData()); 713 m_gl->GenSyncTokenCHROMIUM(fenceSync, produceSyncToken.GetData());
714 } 714 }
715 715
716 DCHECK(produceSyncToken.HasData()); 716 if (!produceSyncToken.HasData()) {
717 // This should only happen if the context has been lost.
718 return false;
719 }
720
717 gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData()); 721 gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData());
718 GLuint sourceTexture = 722 GLuint sourceTexture =
719 gl->CreateAndConsumeTextureCHROMIUM(target, mailbox.name); 723 gl->CreateAndConsumeTextureCHROMIUM(target, mailbox.name);
720 724
721 GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE; 725 GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE;
722 GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE; 726 GLboolean unpackUnpremultiplyAlphaNeeded = GL_FALSE;
723 if (m_wantAlphaChannel && m_premultipliedAlpha && !premultiplyAlpha) 727 if (m_wantAlphaChannel && m_premultipliedAlpha && !premultiplyAlpha)
724 unpackUnpremultiplyAlphaNeeded = GL_TRUE; 728 unpackUnpremultiplyAlphaNeeded = GL_TRUE;
725 else if (m_wantAlphaChannel && !m_premultipliedAlpha && premultiplyAlpha) 729 else if (m_wantAlphaChannel && !m_premultipliedAlpha && premultiplyAlpha)
726 unpackPremultiplyAlphaNeeded = GL_TRUE; 730 unpackPremultiplyAlphaNeeded = GL_TRUE;
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 if (m_pixelUnpackBufferBindingDirty) 1266 if (m_pixelUnpackBufferBindingDirty)
1263 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); 1267 client->DrawingBufferClientRestorePixelUnpackBufferBinding();
1264 } 1268 }
1265 1269
1266 bool DrawingBuffer::shouldUseChromiumImage() { 1270 bool DrawingBuffer::shouldUseChromiumImage() {
1267 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1271 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1268 m_chromiumImageUsage == AllowChromiumImage; 1272 m_chromiumImageUsage == AllowChromiumImage;
1269 } 1273 }
1270 1274
1271 } // namespace blink 1275 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698