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

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

Issue 981913002: update getFramebufferAttachmentParameter for WebGL 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback + rebased code Created 5 years, 7 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 | « Source/platform/graphics/gpu/DrawingBuffer.h ('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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 return; 811 return;
812 } 812 }
813 m_context->bindFramebuffer(GL_FRAMEBUFFER, m_framebufferBinding); 813 m_context->bindFramebuffer(GL_FRAMEBUFFER, m_framebufferBinding);
814 } 814 }
815 815
816 bool DrawingBuffer::multisample() const 816 bool DrawingBuffer::multisample() const
817 { 817 {
818 return m_multisampleMode != None; 818 return m_multisampleMode != None;
819 } 819 }
820 820
821 void DrawingBuffer::bind() 821 void DrawingBuffer::bind(GLenum target)
822 { 822 {
823 m_context->bindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO ? m_multisampleF BO : m_fbo); 823 m_context->bindFramebuffer(target, m_multisampleFBO ? m_multisampleFBO : m_f bo);
824 } 824 }
825 825
826 void DrawingBuffer::setPackAlignment(GLint param) 826 void DrawingBuffer::setPackAlignment(GLint param)
827 { 827 {
828 m_packAlignment = param; 828 m_packAlignment = param;
829 } 829 }
830 830
831 void DrawingBuffer::paintRenderingResultsToCanvas(ImageBuffer* imageBuffer) 831 void DrawingBuffer::paintRenderingResultsToCanvas(ImageBuffer* imageBuffer)
832 { 832 {
833 paintFramebufferToCanvas(framebuffer(), size().width(), size().height(), !m_ actualAttributes.premultipliedAlpha, imageBuffer); 833 paintFramebufferToCanvas(framebuffer(), size().width(), size().height(), !m_ actualAttributes.premultipliedAlpha, imageBuffer);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) 981 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info)
982 { 982 {
983 if (info->imageId) { 983 if (info->imageId) {
984 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); 984 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId);
985 m_context->destroyImageCHROMIUM(info->imageId); 985 m_context->destroyImageCHROMIUM(info->imageId);
986 info->imageId = 0; 986 info->imageId = 0;
987 } 987 }
988 } 988 }
989 989
990 } // namespace blink 990 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698