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

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

Issue 2162673002: webgl: Zero-initialize the SyncToken before calling GenSyncTokenCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 else if (m_wantAlphaChannel && !m_premultipliedAlpha && premultiplyAlpha) 562 else if (m_wantAlphaChannel && !m_premultipliedAlpha && premultiplyAlpha)
563 unpackPremultiplyAlphaNeeded = GL_TRUE; 563 unpackPremultiplyAlphaNeeded = GL_TRUE;
564 564
565 gl->CopyTextureCHROMIUM(sourceTexture, texture, internalFormat, destType, fl ipY, unpackPremultiplyAlphaNeeded, unpackUnpremultiplyAlphaNeeded); 565 gl->CopyTextureCHROMIUM(sourceTexture, texture, internalFormat, destType, fl ipY, unpackPremultiplyAlphaNeeded, unpackUnpremultiplyAlphaNeeded);
566 566
567 gl->DeleteTextures(1, &sourceTexture); 567 gl->DeleteTextures(1, &sourceTexture);
568 568
569 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM(); 569 const GLuint64 fenceSync = gl->InsertFenceSyncCHROMIUM();
570 570
571 gl->Flush(); 571 gl->Flush();
572 GLbyte syncToken[24]; 572 GLbyte syncToken[24] = { 0 };
Ken Russell (switch to Gerrit) 2016/07/18 21:27:05 Is this code allowed to reference src/gpu/GLES2/gl
danakj 2016/07/18 21:40:35 Done. Thanks, didn't know that exists.
573 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken); 573 gl->GenSyncTokenCHROMIUM(fenceSync, syncToken);
574 m_gl->WaitSyncTokenCHROMIUM(syncToken); 574 m_gl->WaitSyncTokenCHROMIUM(syncToken);
575 575
576 return true; 576 return true;
577 } 577 }
578 578
579 GLuint DrawingBuffer::framebuffer() const 579 GLuint DrawingBuffer::framebuffer() const
580 { 580 {
581 return m_fbo; 581 return m_fbo;
582 } 582 }
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1108
1109 void DrawingBuffer::restoreTextureBindings() 1109 void DrawingBuffer::restoreTextureBindings()
1110 { 1110 {
1111 // This class potentially modifies the bindings for GL_TEXTURE_2D and 1111 // This class potentially modifies the bindings for GL_TEXTURE_2D and
1112 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since 1112 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since
1113 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1113 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1114 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1114 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1115 } 1115 }
1116 1116
1117 } // namespace blink 1117 } // 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