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

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

Issue 1804243002: Re-enable IOSurface Canvas2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error. Created 4 years, 9 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
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 restoreFramebufferBindings(); 302 restoreFramebufferBindings();
303 m_contentsChanged = false; 303 m_contentsChanged = false;
304 304
305 m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo .textureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBu fferMailbox->mailbox.name); 305 m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo .textureId, frontColorBufferMailbox->textureInfo.parameters.target, frontColorBu fferMailbox->mailbox.name);
306 const WGC3Duint64 fenceSync = m_context->insertFenceSyncCHROMIUM(); 306 const WGC3Duint64 fenceSync = m_context->insertFenceSyncCHROMIUM();
307 m_context->flush(); 307 m_context->flush();
308 frontColorBufferMailbox->mailbox.validSyncToken = m_context->genSyncTokenCHR OMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncToken); 308 frontColorBufferMailbox->mailbox.validSyncToken = m_context->genSyncTokenCHR OMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncToken);
309 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0; 309 frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->tex tureInfo.imageId != 0;
310 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target; 310 frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->te xtureInfo.parameters.target;
311 frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_siz e.height());
311 setBufferClearNeeded(true); 312 setBufferClearNeeded(true);
312 313
313 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes 314 // set m_parentDrawingBuffer to make sure 'this' stays alive as long as it h as live mailboxes
314 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer); 315 ASSERT(!frontColorBufferMailbox->m_parentDrawingBuffer);
315 frontColorBufferMailbox->m_parentDrawingBuffer = this; 316 frontColorBufferMailbox->m_parentDrawingBuffer = this;
316 *outMailbox = frontColorBufferMailbox->mailbox; 317 *outMailbox = frontColorBufferMailbox->mailbox;
317 m_frontColorBuffer = { frontColorBufferMailbox->textureInfo, frontColorBuffe rMailbox->mailbox }; 318 m_frontColorBuffer = { frontColorBufferMailbox->textureInfo, frontColorBuffe rMailbox->mailbox };
318 return true; 319 return true;
319 } 320 }
320 321
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 1033
1033 if (m_antiAliasingMode == MSAAImplicitResolve) 1034 if (m_antiAliasingMode == MSAAImplicitResolve)
1034 m_context->framebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_A TTACHMENT0, target, m_colorBuffer.textureId, 0, m_sampleCount); 1035 m_context->framebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_A TTACHMENT0, target, m_colorBuffer.textureId, 0, m_sampleCount);
1035 else 1036 else
1036 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, ta rget, m_colorBuffer.textureId, 0); 1037 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, ta rget, m_colorBuffer.textureId, 0);
1037 1038
1038 m_context->bindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1039 m_context->bindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1039 } 1040 }
1040 1041
1041 } // namespace blink 1042 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698