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

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

Issue 2062813003: Remove use of DescheduleUntilFinished from WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 } else { 282 } else {
283 m_gl->CopyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMailb ox->textureInfo.textureId, frontColorBufferMailbox->textureInfo.parameters.inter nalColorFormat, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE); 283 m_gl->CopyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMailb ox->textureInfo.textureId, frontColorBufferMailbox->textureInfo.parameters.inter nalColorFormat, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE);
284 } 284 }
285 285
286 restoreFramebufferBindings(); 286 restoreFramebufferBindings();
287 m_contentsChanged = false; 287 m_contentsChanged = false;
288 288
289 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM ailbox->mailbox.name); 289 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM ailbox->mailbox.name);
290 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); 290 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM();
291 if (RuntimeEnabledFeatures::webGLImageChromiumEnabled())
292 m_gl->DescheduleUntilFinishedCHROMIUM();
293 m_gl->Flush(); 291 m_gl->Flush();
294 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT oken); 292 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT oken);
295 frontColorBufferMailbox->mailbox.validSyncToken = true; 293 frontColorBufferMailbox->mailbox.validSyncToken = true;
296 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0; 294 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0;
297 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target; 295 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target;
298 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height()); 296 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height());
299 frontColorBufferMailbox->mailbox.gpuMemoryBufferId = frontColorBufferMailbox ->textureInfo.gpuMemoryBufferId; 297 frontColorBufferMailbox->mailbox.gpuMemoryBufferId = frontColorBufferMailbox ->textureInfo.gpuMemoryBufferId;
300 setBufferClearNeeded(true); 298 setBufferClearNeeded(true);
301 299
302 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes 300 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1077
1080 void DrawingBuffer::restoreTextureBindings() 1078 void DrawingBuffer::restoreTextureBindings()
1081 { 1079 {
1082 // This class potentially modifies the bindings for GL_TEXTURE_2D and 1080 // This class potentially modifies the bindings for GL_TEXTURE_2D and
1083 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since 1081 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since
1084 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1082 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1085 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1083 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1086 } 1084 }
1087 1085
1088 } // namespace blink 1086 } // 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