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

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

Issue 1846713004: Remove premultipliedAlpha from WebGraphicsContext3D::Attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: premul: tests2 Created 4 years, 8 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
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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 ADD_VALUES_TO_SET(m_supportedTypes, kSupportedTypesES2); 878 ADD_VALUES_TO_SET(m_supportedTypes, kSupportedTypesES2);
879 } 879 }
880 880
881 PassRefPtr<DrawingBuffer> WebGLRenderingContextBase::createDrawingBuffer(PassOwn Ptr<WebGraphicsContext3DProvider> contextProvider) 881 PassRefPtr<DrawingBuffer> WebGLRenderingContextBase::createDrawingBuffer(PassOwn Ptr<WebGraphicsContext3DProvider> contextProvider)
882 { 882 {
883 WebGraphicsContext3D::Attributes attrs; 883 WebGraphicsContext3D::Attributes attrs;
884 attrs.alpha = m_requestedAttributes.alpha(); 884 attrs.alpha = m_requestedAttributes.alpha();
885 attrs.depth = m_requestedAttributes.depth(); 885 attrs.depth = m_requestedAttributes.depth();
886 attrs.stencil = m_requestedAttributes.stencil(); 886 attrs.stencil = m_requestedAttributes.stencil();
887 attrs.antialias = m_requestedAttributes.antialias(); 887 attrs.antialias = m_requestedAttributes.antialias();
888 attrs.premultipliedAlpha = m_requestedAttributes.premultipliedAlpha(); 888 bool premultipliedAlpha = m_requestedAttributes.premultipliedAlpha();
889 DrawingBuffer::PreserveDrawingBuffer preserve = m_requestedAttributes.preser veDrawingBuffer() ? DrawingBuffer::Preserve : DrawingBuffer::Discard; 889 DrawingBuffer::PreserveDrawingBuffer preserve = m_requestedAttributes.preser veDrawingBuffer() ? DrawingBuffer::Preserve : DrawingBuffer::Discard;
890 return DrawingBuffer::create(contextProvider, clampedCanvasSize(), preserve, attrs); 890 return DrawingBuffer::create(contextProvider, clampedCanvasSize(), premultip liedAlpha, preserve, attrs);
891 } 891 }
892 892
893 void WebGLRenderingContextBase::initializeNewContext() 893 void WebGLRenderingContextBase::initializeNewContext()
894 { 894 {
895 ASSERT(!isContextLost()); 895 ASSERT(!isContextLost());
896 ASSERT(drawingBuffer()); 896 ASSERT(drawingBuffer());
897 897
898 m_markedCanvasDirty = false; 898 m_markedCanvasDirty = false;
899 m_activeTextureUnit = 0; 899 m_activeTextureUnit = 0;
900 m_packAlignment = 4; 900 m_packAlignment = 4;
(...skipping 5443 matching lines...) Expand 10 before | Expand all | Expand 10 after
6344 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); 6344 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
6345 } 6345 }
6346 6346
6347 void WebGLRenderingContextBase::restoreUnpackParameters() 6347 void WebGLRenderingContextBase::restoreUnpackParameters()
6348 { 6348 {
6349 if (m_unpackAlignment != 1) 6349 if (m_unpackAlignment != 1)
6350 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6350 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6351 } 6351 }
6352 6352
6353 } // namespace blink 6353 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698