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

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

Issue 1790753002: Expose GLES2Interface to blink, and delete isContextLost() from WGC3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wgc3d: deps-for-tests Created 4 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
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "public/platform/Platform.h" 63 #include "public/platform/Platform.h"
64 64
65 namespace blink { 65 namespace blink {
66 66
67 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> WebGLRenderingContext::Factory::c reate(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, D ocument&) 67 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> WebGLRenderingContext::Factory::c reate(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, D ocument&)
68 { 68 {
69 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs); 69 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs);
70 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr ibutes, 1)); 70 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr ibutes, 1));
71 if (!context) 71 if (!context)
72 return nullptr; 72 return nullptr;
73 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et()); 73 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et(), context->getGLES2Interface());
74 if (!extensionsUtil) 74 if (!extensionsUtil)
75 return nullptr; 75 return nullptr;
76 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { 76 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) {
77 String contextLabel(String::format("WebGLRenderingContext-%p", context.g et())); 77 String contextLabel(String::format("WebGLRenderingContext-%p", context.g et()));
78 context->pushGroupMarkerEXT(contextLabel.ascii().data()); 78 context->pushGroupMarkerEXT(contextLabel.ascii().data());
79 } 79 }
80 80
81 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN oop(new WebGLRenderingContext(canvas, context.release(), attributes)); 81 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN oop(new WebGLRenderingContext(canvas, context.release(), attributes));
82 82
83 if (!renderingContext->drawingBuffer()) { 83 if (!renderingContext->drawingBuffer()) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 visitor->trace(m_webglCompressedTextureASTC); 166 visitor->trace(m_webglCompressedTextureASTC);
167 visitor->trace(m_webglCompressedTextureATC); 167 visitor->trace(m_webglCompressedTextureATC);
168 visitor->trace(m_webglCompressedTextureETC1); 168 visitor->trace(m_webglCompressedTextureETC1);
169 visitor->trace(m_webglCompressedTexturePVRTC); 169 visitor->trace(m_webglCompressedTexturePVRTC);
170 visitor->trace(m_webglCompressedTextureS3TC); 170 visitor->trace(m_webglCompressedTextureS3TC);
171 visitor->trace(m_webglDepthTexture); 171 visitor->trace(m_webglDepthTexture);
172 WebGLRenderingContextBase::trace(visitor); 172 WebGLRenderingContextBase::trace(visitor);
173 } 173 }
174 174
175 } // namespace blink 175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698