Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 980 | 980 |
| 981 // On old AMD GPUs on OS X, glColorMask doesn't work correctly for | 981 // On old AMD GPUs on OS X, glColorMask doesn't work correctly for |
| 982 // multisampled renderbuffers and the alpha channel can be overwritten. | 982 // multisampled renderbuffers and the alpha channel can be overwritten. |
| 983 // Clear the alpha channel of |m_fbo|. | 983 // Clear the alpha channel of |m_fbo|. |
| 984 if (defaultBufferRequiresAlphaChannelToBePreserved() && | 984 if (defaultBufferRequiresAlphaChannelToBePreserved() && |
| 985 contextProvider() | 985 contextProvider() |
| 986 ->getCapabilities() | 986 ->getCapabilities() |
| 987 .disable_multisampling_color_mask_usage) { | 987 .disable_multisampling_color_mask_usage) { |
| 988 m_gl->ClearColor(0, 0, 0, 1); | 988 m_gl->ClearColor(0, 0, 0, 1); |
| 989 m_gl->ColorMask(false, false, false, true); | 989 m_gl->ColorMask(false, false, false, true); |
| 990 m_gl->Clear(GL_COLOR_BUFFER_BIT); | |
| 991 m_gl->ColorMask(true, true, true, false); | |
|
Ken Russell (switch to Gerrit)
2016/12/01 07:20:43
While I'm pretty sure this was just an omission, t
erikchen
2016/12/01 16:04:11
This was a relatively recent regression from:
http
ccameron
2016/12/01 19:25:59
Gah, sorry!!!
Shouldn't we be doing
m_client->D
Kai Ninomiya
2016/12/01 23:30:20
I see, it looks like the `m_stateRestorer->setClea
| |
| 990 } | 992 } |
| 991 } | 993 } |
| 992 | 994 |
| 993 m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo); | 995 m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo); |
| 994 if (m_antiAliasingMode == ScreenSpaceAntialiasing) | 996 if (m_antiAliasingMode == ScreenSpaceAntialiasing) |
| 995 m_gl->ApplyScreenSpaceAntialiasingCHROMIUM(); | 997 m_gl->ApplyScreenSpaceAntialiasingCHROMIUM(); |
| 996 m_contentsChangeCommitted = true; | 998 m_contentsChangeCommitted = true; |
| 997 } | 999 } |
| 998 | 1000 |
| 999 void DrawingBuffer::restoreFramebufferBindings() { | 1001 void DrawingBuffer::restoreFramebufferBindings() { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1261 if (m_pixelUnpackBufferBindingDirty) | 1263 if (m_pixelUnpackBufferBindingDirty) |
| 1262 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); | 1264 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); |
| 1263 } | 1265 } |
| 1264 | 1266 |
| 1265 bool DrawingBuffer::shouldUseChromiumImage() { | 1267 bool DrawingBuffer::shouldUseChromiumImage() { |
| 1266 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && | 1268 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && |
| 1267 m_chromiumImageUsage == AllowChromiumImage; | 1269 m_chromiumImageUsage == AllowChromiumImage; |
| 1268 } | 1270 } |
| 1269 | 1271 |
| 1270 } // namespace blink | 1272 } // namespace blink |
| OLD | NEW |