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

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

Issue 2125023002: Reland "webgl: use immutable texture for the default FBO." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m_webGLVersion > WebGL1 (for future versions) Created 4 years, 5 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 return renderingContext; 117 return renderingContext;
118 } 118 }
119 119
120 void WebGLRenderingContext::Factory::onError(HTMLCanvasElement* canvas, const St ring& error) 120 void WebGLRenderingContext::Factory::onError(HTMLCanvasElement* canvas, const St ring& error)
121 { 121 {
122 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontext creationerror, false, true, error)); 122 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontext creationerror, false, true, error));
123 } 123 }
124 124
125 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, st d::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const WebGLContextA ttributes& requestedAttributes) 125 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, st d::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const WebGLContextA ttributes& requestedAttributes)
126 : WebGLRenderingContextBase(passedCanvas, std::move(contextProvider), reques tedAttributes) 126 : WebGLRenderingContextBase(passedCanvas, std::move(contextProvider), reques tedAttributes, 1)
127 { 127 {
128 } 128 }
129 129
130 WebGLRenderingContext::WebGLRenderingContext(OffscreenCanvas* passedOffscreenCan vas, std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const WebGLC ontextAttributes& requestedAttributes) 130 WebGLRenderingContext::WebGLRenderingContext(OffscreenCanvas* passedOffscreenCan vas, std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const WebGLC ontextAttributes& requestedAttributes)
131 : WebGLRenderingContextBase(passedOffscreenCanvas, std::move(contextProvider ), requestedAttributes) 131 : WebGLRenderingContextBase(passedOffscreenCanvas, std::move(contextProvider ), requestedAttributes, 1)
132 { 132 {
133 } 133 }
134 134
135 WebGLRenderingContext::~WebGLRenderingContext() 135 WebGLRenderingContext::~WebGLRenderingContext()
136 { 136 {
137 } 137 }
138 138
139 void WebGLRenderingContext::setCanvasGetContextResult(RenderingContext& result) 139 void WebGLRenderingContext::setCanvasGetContextResult(RenderingContext& result)
140 { 140 {
141 result.setWebGLRenderingContext(this); 141 result.setWebGLRenderingContext(this);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 visitor->traceWrappers(m_webglDebugShaders); 232 visitor->traceWrappers(m_webglDebugShaders);
233 visitor->traceWrappers(m_webglDrawBuffers); 233 visitor->traceWrappers(m_webglDrawBuffers);
234 visitor->traceWrappers(m_webglCompressedTextureASTC); 234 visitor->traceWrappers(m_webglCompressedTextureASTC);
235 visitor->traceWrappers(m_webglCompressedTextureATC); 235 visitor->traceWrappers(m_webglCompressedTextureATC);
236 visitor->traceWrappers(m_webglCompressedTextureETC1); 236 visitor->traceWrappers(m_webglCompressedTextureETC1);
237 visitor->traceWrappers(m_webglCompressedTexturePVRTC); 237 visitor->traceWrappers(m_webglCompressedTexturePVRTC);
238 visitor->traceWrappers(m_webglCompressedTextureS3TC); 238 visitor->traceWrappers(m_webglCompressedTextureS3TC);
239 visitor->traceWrappers(m_webglDepthTexture); 239 visitor->traceWrappers(m_webglDepthTexture);
240 } 240 }
241 } // namespace blink 241 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698