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

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

Issue 2535173002: Prevent implicit framebuffer clear from clobbering alpha in emulated RGB (Closed)
Patch Set: remove unnecessary std::list Created 4 years 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 | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp ('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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
990 } 991 }
991 } 992 }
992 993
993 m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo); 994 m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
994 if (m_antiAliasingMode == ScreenSpaceAntialiasing) 995 if (m_antiAliasingMode == ScreenSpaceAntialiasing)
995 m_gl->ApplyScreenSpaceAntialiasingCHROMIUM(); 996 m_gl->ApplyScreenSpaceAntialiasingCHROMIUM();
996 m_contentsChangeCommitted = true; 997 m_contentsChangeCommitted = true;
997 } 998 }
998 999
999 void DrawingBuffer::restoreFramebufferBindings() { 1000 void DrawingBuffer::restoreFramebufferBindings() {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 if (m_pixelUnpackBufferBindingDirty) 1262 if (m_pixelUnpackBufferBindingDirty)
1262 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); 1263 client->DrawingBufferClientRestorePixelUnpackBufferBinding();
1263 } 1264 }
1264 1265
1265 bool DrawingBuffer::shouldUseChromiumImage() { 1266 bool DrawingBuffer::shouldUseChromiumImage() {
1266 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1267 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1267 m_chromiumImageUsage == AllowChromiumImage; 1268 m_chromiumImageUsage == AllowChromiumImage;
1268 } 1269 }
1269 1270
1270 } // namespace blink 1271 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698