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

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

Issue 2219963002: Always call DescheduleUntilFinished for WebGL on macOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } else { 297 } else {
298 m_gl->CopySubTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMa ilbox->textureInfo.textureId, 298 m_gl->CopySubTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMa ilbox->textureInfo.textureId,
299 0, 0, 0, 0, m_size.width(), m_size.height(), GL_FALSE, GL_FALSE, GL_ FALSE); 299 0, 0, 0, 0, m_size.width(), m_size.height(), GL_FALSE, GL_FALSE, GL_ FALSE);
300 } 300 }
301 301
302 restoreFramebufferBindings(); 302 restoreFramebufferBindings();
303 m_contentsChanged = false; 303 m_contentsChanged = false;
304 304
305 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM ailbox->mailbox.name); 305 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM ailbox->mailbox.name);
306 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); 306 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM();
307 if (RuntimeEnabledFeatures::webGLImageChromiumEnabled()) 307 #if OS(MACOSX)
308 m_gl->DescheduleUntilFinishedCHROMIUM(); 308 m_gl->DescheduleUntilFinishedCHROMIUM();
309 #endif
309 m_gl->Flush(); 310 m_gl->Flush();
310 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT oken); 311 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT oken);
311 frontColorBufferMailbox->mailbox.validSyncToken = true; 312 frontColorBufferMailbox->mailbox.validSyncToken = true;
312 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0; 313 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0;
313 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target; 314 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target;
314 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height()); 315 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height());
315 setBufferClearNeeded(true); 316 setBufferClearNeeded(true);
316 317
317 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes 318 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes
318 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer); 319 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer);
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 1112
1112 void DrawingBuffer::restoreTextureBindings() 1113 void DrawingBuffer::restoreTextureBindings()
1113 { 1114 {
1114 // This class potentially modifies the bindings for GL_TEXTURE_2D and 1115 // This class potentially modifies the bindings for GL_TEXTURE_2D and
1115 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since 1116 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since
1116 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1117 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1117 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1118 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1118 } 1119 }
1119 1120
1120 } // namespace blink 1121 } // 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