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

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

Issue 179973004: Share Group plumbing in Blink; Remove WebGL from default share group (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Refactored syncing based on piman@'s feedback Created 6 years, 9 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
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 5320 matching lines...) Expand 10 before | Expand all | Expand 10 after
5331 LocalFrame* frame = canvas()->document().frame(); 5331 LocalFrame* frame = canvas()->document().frame();
5332 if (!frame) 5332 if (!frame)
5333 return; 5333 return;
5334 5334
5335 Settings* settings = frame->settings(); 5335 Settings* settings = frame->settings();
5336 5336
5337 if (!frame->loader().client()->allowWebGL(settings && settings->webGLEnabled ())) 5337 if (!frame->loader().client()->allowWebGL(settings && settings->webGLEnabled ()))
5338 return; 5338 return;
5339 5339
5340 blink::WebGraphicsContext3D::Attributes attributes = m_requestedAttributes-> attributes(canvas()->document().topDocument().url().string(), settings); 5340 blink::WebGraphicsContext3D::Attributes attributes = m_requestedAttributes-> attributes(canvas()->document().topDocument().url().string(), settings);
5341 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr ent()->createOffscreenGraphicsContext3D(attributes)); 5341 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr ent()->createOffscreenGraphicsContext3D(attributes, 0));
5342 if (!context) { 5342 if (!context) {
5343 if (m_contextLostMode == RealLostContext) { 5343 if (m_contextLostMode == RealLostContext) {
5344 m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts, FROM_HERE ); 5344 m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts, FROM_HERE );
5345 } else { 5345 } else {
5346 // This likely shouldn't happen but is the best way to report it to the WebGL app. 5346 // This likely shouldn't happen but is the best way to report it to the WebGL app.
5347 synthesizeGLError(GL_INVALID_OPERATION, "", "error restoring context "); 5347 synthesizeGLError(GL_INVALID_OPERATION, "", "error restoring context ");
5348 } 5348 }
5349 return; 5349 return;
5350 } 5350 }
5351 5351
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
5559 if (m_textureUnits[i].m_texture2DBinding 5559 if (m_textureUnits[i].m_texture2DBinding
5560 || m_textureUnits[i].m_textureCubeMapBinding) { 5560 || m_textureUnits[i].m_textureCubeMapBinding) {
5561 m_onePlusMaxNonDefaultTextureUnit = i + 1; 5561 m_onePlusMaxNonDefaultTextureUnit = i + 1;
5562 return; 5562 return;
5563 } 5563 }
5564 } 5564 }
5565 m_onePlusMaxNonDefaultTextureUnit = 0; 5565 m_onePlusMaxNonDefaultTextureUnit = 0;
5566 } 5566 }
5567 5567
5568 } // namespace WebCore 5568 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698