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

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

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 901
902 WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa nvas, 902 WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa nvas,
903 std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, 903 std::unique_ptr<WebGraphicsContext3DProvider> contextProvider,
904 const WebGLContextAttributes& requestedAttributes, unsigned version) 904 const WebGLContextAttributes& requestedAttributes, unsigned version)
905 : WebGLRenderingContextBase(passedCanvas, nullptr, std::move(contextProvider ), requestedAttributes, version) 905 : WebGLRenderingContextBase(passedCanvas, nullptr, std::move(contextProvider ), requestedAttributes, version)
906 { } 906 { }
907 907
908 WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa nvas, 908 WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa nvas,
909 OffscreenCanvas* passedOffscreenCanvas, std::unique_ptr<WebGraphicsContext3D Provider> contextProvider, 909 OffscreenCanvas* passedOffscreenCanvas, std::unique_ptr<WebGraphicsContext3D Provider> contextProvider,
910 const WebGLContextAttributes& requestedAttributes, unsigned version) 910 const WebGLContextAttributes& requestedAttributes, unsigned version)
911 : CanvasRenderingContext(passedCanvas, passedOffscreenCanvas) 911 : CanvasRenderingContext(passedCanvas, passedOffscreenCanvas, "")
chrishtr 2016/08/08 22:04:31 No namespace?
chrishtr 2016/08/08 22:04:50 s/namespace/colorspace/
Justin Novosad 2016/08/11 19:32:57 My intention is to land in two phases. Phase two w
912 , m_isHidden(false) 912 , m_isHidden(false)
913 , m_contextLostMode(NotLostContext) 913 , m_contextLostMode(NotLostContext)
914 , m_autoRecoveryMethod(Manual) 914 , m_autoRecoveryMethod(Manual)
915 , m_dispatchContextLostEventTimer(this, &WebGLRenderingContextBase::dispatch ContextLostEvent) 915 , m_dispatchContextLostEventTimer(this, &WebGLRenderingContextBase::dispatch ContextLostEvent)
916 , m_restoreAllowed(false) 916 , m_restoreAllowed(false)
917 , m_restoreTimer(this, &WebGLRenderingContextBase::maybeRestoreContext) 917 , m_restoreTimer(this, &WebGLRenderingContextBase::maybeRestoreContext)
918 , m_preservedDefaultVAOObjectWrapper(false) 918 , m_preservedDefaultVAOObjectWrapper(false)
919 , m_generatedImageCache(4) 919 , m_generatedImageCache(4)
920 , m_requestedAttributes(requestedAttributes) 920 , m_requestedAttributes(requestedAttributes)
921 , m_synthesizedErrorsToConsole(true) 921 , m_synthesizedErrorsToConsole(true)
(...skipping 5568 matching lines...) Expand 10 before | Expand all | Expand 10 after
6490 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); 6490 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
6491 } 6491 }
6492 6492
6493 void WebGLRenderingContextBase::restoreUnpackParameters() 6493 void WebGLRenderingContextBase::restoreUnpackParameters()
6494 { 6494 {
6495 if (m_unpackAlignment != 1) 6495 if (m_unpackAlignment != 1)
6496 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6496 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6497 } 6497 }
6498 6498
6499 } // namespace blink 6499 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698