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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 929003004: Oilpan: unbreak WebGL context lost tests following r190259. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 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 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 2244
2245 bool WebGLRenderingContextBase::extensionSupportedAndAllowed(const ExtensionTrac ker* tracker) 2245 bool WebGLRenderingContextBase::extensionSupportedAndAllowed(const ExtensionTrac ker* tracker)
2246 { 2246 {
2247 if (tracker->draft() && !RuntimeEnabledFeatures::webGLDraftExtensionsEnabled ()) 2247 if (tracker->draft() && !RuntimeEnabledFeatures::webGLDraftExtensionsEnabled ())
2248 return false; 2248 return false;
2249 if (!tracker->supported(this)) 2249 if (!tracker->supported(this))
2250 return false; 2250 return false;
2251 return true; 2251 return true;
2252 } 2252 }
2253 2253
2254
2255 ScriptValue WebGLRenderingContextBase::getExtension(ScriptState* scriptState, co nst String& name) 2254 ScriptValue WebGLRenderingContextBase::getExtension(ScriptState* scriptState, co nst String& name)
2256 { 2255 {
2257 RefPtrWillBeRawPtr<WebGLExtension> extension; 2256 RefPtrWillBeRawPtr<WebGLExtension> extension = nullptr;
2258 2257
2259 if (!isContextLost()) { 2258 if (!isContextLost()) {
2260 for (size_t i = 0; i < m_extensions.size(); ++i) { 2259 for (size_t i = 0; i < m_extensions.size(); ++i) {
2261 ExtensionTracker* tracker = m_extensions[i].get(); 2260 ExtensionTracker* tracker = m_extensions[i].get();
2262 if (tracker->matchesNameWithPrefixes(name)) { 2261 if (tracker->matchesNameWithPrefixes(name)) {
2263 if (extensionSupportedAndAllowed(tracker)) { 2262 if (extensionSupportedAndAllowed(tracker)) {
2264 extension = tracker->getExtension(this); 2263 extension = tracker->getExtension(this);
2265 if (extension) 2264 if (extension)
2266 m_extensionEnabled[extension->name()] = true; 2265 m_extensionEnabled[extension->name()] = true;
2267 } 2266 }
(...skipping 3769 matching lines...) Expand 10 before | Expand all | Expand 10 after
6037 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; 6036 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0;
6038 } 6037 }
6039 #else 6038 #else
6040 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 6039 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
6041 { 6040 {
6042 return m_drawingBuffer.get(); 6041 return m_drawingBuffer.get();
6043 } 6042 }
6044 #endif 6043 #endif
6045 6044
6046 } // namespace blink 6045 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698