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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2053983002: WebGL: Three small fixes to Image CHROMIUM logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h » ('j') | 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 } 1240 }
1241 if (contextAttributes.get().stencil() || drawingBuffer()->hasImplicitStencil Buffer()) { 1241 if (contextAttributes.get().stencil() || drawingBuffer()->hasImplicitStencil Buffer()) {
1242 if (combinedClear && (mask & GL_STENCIL_BUFFER_BIT)) 1242 if (combinedClear && (mask & GL_STENCIL_BUFFER_BIT))
1243 contextGL()->ClearStencil(m_clearStencil & m_stencilMask); 1243 contextGL()->ClearStencil(m_clearStencil & m_stencilMask);
1244 else 1244 else
1245 contextGL()->ClearStencil(0); 1245 contextGL()->ClearStencil(0);
1246 clearMask |= GL_STENCIL_BUFFER_BIT; 1246 clearMask |= GL_STENCIL_BUFFER_BIT;
1247 contextGL()->StencilMaskSeparate(GL_FRONT, 0xFFFFFFFF); 1247 contextGL()->StencilMaskSeparate(GL_FRONT, 0xFFFFFFFF);
1248 } 1248 }
1249 1249
1250 contextGL()->ColorMask(true, true, true, !drawingBuffer()->defaultBufferRequ iresAlphaChannelToBePreserved());
1250 drawingBuffer()->clearFramebuffers(clearMask); 1251 drawingBuffer()->clearFramebuffers(clearMask);
1251 1252
1252 restoreStateAfterClear(); 1253 restoreStateAfterClear();
1253 drawingBuffer()->restoreFramebufferBindings(); 1254 drawingBuffer()->restoreFramebufferBindings();
1254 drawingBuffer()->setBufferClearNeeded(false); 1255 drawingBuffer()->setBufferClearNeeded(false);
1255 1256
1256 return combinedClear ? CombinedClear : JustClear; 1257 return combinedClear ? CombinedClear : JustClear;
1257 } 1258 }
1258 1259
1259 void WebGLRenderingContextBase::restoreStateAfterClear() 1260 void WebGLRenderingContextBase::restoreStateAfterClear()
(...skipping 5174 matching lines...) Expand 10 before | Expand all | Expand 10 after
6434 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); 6435 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
6435 } 6436 }
6436 6437
6437 void WebGLRenderingContextBase::restoreUnpackParameters() 6438 void WebGLRenderingContextBase::restoreUnpackParameters()
6438 { 6439 {
6439 if (m_unpackAlignment != 1) 6440 if (m_unpackAlignment != 1)
6440 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6441 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6441 } 6442 }
6442 6443
6443 } // namespace blink 6444 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698