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

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

Issue 2025973002: Re-enable WebGL Image Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp64_webgl_deschedule
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 | « content/child/runtime_features.cc ('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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 } else { 280 } else {
281 m_gl->CopyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMailb ox->textureInfo.textureId, frontColorBufferMailbox->textureInfo.parameters.inter nalColorFormat, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE); 281 m_gl->CopyTextureCHROMIUM(m_colorBuffer.textureId, frontColorBufferMailb ox->textureInfo.textureId, frontColorBufferMailbox->textureInfo.parameters.inter nalColorFormat, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE);
282 } 282 }
283 283
284 restoreFramebufferBindings(); 284 restoreFramebufferBindings();
285 m_contentsChanged = false; 285 m_contentsChanged = false;
286 286
287 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM ailbox->mailbox.name); 287 m_gl->ProduceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.text ureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBufferM ailbox->mailbox.name);
288 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM(); 288 const GLuint64 fenceSync = m_gl->InsertFenceSyncCHROMIUM();
289 if (RuntimeEnabledFeatures::webGLImageChromiumEnabled())
290 m_gl->DescheduleUntilFinishedCHROMIUM();
289 m_gl->Flush(); 291 m_gl->Flush();
290 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT oken); 292 m_gl->GenSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncT oken);
291 frontColorBufferMailbox->mailbox.validSyncToken = true; 293 frontColorBufferMailbox->mailbox.validSyncToken = true;
292 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0; 294 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0;
293 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target; 295 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target;
294 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height()); 296 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height());
295 setBufferClearNeeded(true); 297 setBufferClearNeeded(true);
296 298
297 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes 299 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes
298 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer); 300 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer);
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 1068
1067 void DrawingBuffer::restoreTextureBindings() 1069 void DrawingBuffer::restoreTextureBindings()
1068 { 1070 {
1069 // This class potentially modifies the bindings for GL_TEXTURE_2D and 1071 // This class potentially modifies the bindings for GL_TEXTURE_2D and
1070 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since 1072 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since
1071 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1073 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1072 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1074 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1073 } 1075 }
1074 1076
1075 } // namespace blink 1077 } // namespace blink
OLDNEW
« no previous file with comments | « content/child/runtime_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698