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

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

Issue 2124183002: Rename a gpu workaround. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp16_offscreen_gmb_bug
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 | « gpu/ipc/common/gpu_command_buffer_traits_multi.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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 int height = m_size.height(); 792 int height = m_size.height();
793 // Use NEAREST, because there is no scale performed during the blit. 793 // Use NEAREST, because there is no scale performed during the blit.
794 GLuint filter = GL_NEAREST; 794 GLuint filter = GL_NEAREST;
795 795
796 m_gl->BlitFramebufferCHROMIUM(0, 0, width, height, 0, 0, width, height, GL_COLOR_BUFFER_BIT, filter); 796 m_gl->BlitFramebufferCHROMIUM(0, 0, width, height, 0, 0, width, height, GL_COLOR_BUFFER_BIT, filter);
797 797
798 // On old AMD GPUs on OS X, glColorMask doesn't work correctly for 798 // On old AMD GPUs on OS X, glColorMask doesn't work correctly for
799 // multisampled renderbuffers and the alpha channel can be overwritten. 799 // multisampled renderbuffers and the alpha channel can be overwritten.
800 // Clear the alpha channel of |m_fbo|. 800 // Clear the alpha channel of |m_fbo|.
801 if (defaultBufferRequiresAlphaChannelToBePreserved() 801 if (defaultBufferRequiresAlphaChannelToBePreserved()
802 && contextProvider()->getCapabilities().disable_webgl_multisampling_ color_mask_usage) { 802 && contextProvider()->getCapabilities().disable_multisampling_color_ mask_usage) {
803 m_gl->ClearColor(0, 0, 0, 1); 803 m_gl->ClearColor(0, 0, 0, 1);
804 m_gl->ColorMask(false, false, false, true); 804 m_gl->ColorMask(false, false, false, true);
805 m_gl->Clear(GL_COLOR_BUFFER_BIT); 805 m_gl->Clear(GL_COLOR_BUFFER_BIT);
806 806
807 m_gl->ClearColor(m_clearColor[0], m_clearColor[1], m_clearColor[2], m_clearColor[3]); 807 m_gl->ClearColor(m_clearColor[0], m_clearColor[1], m_clearColor[2], m_clearColor[3]);
808 m_gl->ColorMask(m_colorMask[0], m_colorMask[1], m_colorMask[2], m_co lorMask[3]); 808 m_gl->ColorMask(m_colorMask[0], m_colorMask[1], m_colorMask[2], m_co lorMask[3]);
809 } 809 }
810 810
811 if (m_scissorEnabled) 811 if (m_scissorEnabled)
812 m_gl->Enable(GL_SCISSOR_TEST); 812 m_gl->Enable(GL_SCISSOR_TEST);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1088
1089 void DrawingBuffer::restoreTextureBindings() 1089 void DrawingBuffer::restoreTextureBindings()
1090 { 1090 {
1091 // This class potentially modifies the bindings for GL_TEXTURE_2D and 1091 // This class potentially modifies the bindings for GL_TEXTURE_2D and
1092 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since 1092 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since
1093 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1093 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1094 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1094 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1095 } 1095 }
1096 1096
1097 } // namespace blink 1097 } // namespace blink
OLDNEW
« no previous file with comments | « gpu/ipc/common/gpu_command_buffer_traits_multi.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698