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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "modules/webgl/WebGLDebugShaders.h" 56 #include "modules/webgl/WebGLDebugShaders.h"
57 #include "modules/webgl/WebGLDepthTexture.h" 57 #include "modules/webgl/WebGLDepthTexture.h"
58 #include "modules/webgl/WebGLDrawBuffers.h" 58 #include "modules/webgl/WebGLDrawBuffers.h"
59 #include "modules/webgl/WebGLLoseContext.h" 59 #include "modules/webgl/WebGLLoseContext.h"
60 #include "platform/CheckedInt.h" 60 #include "platform/CheckedInt.h"
61 #include "platform/graphics/gpu/DrawingBuffer.h" 61 #include "platform/graphics/gpu/DrawingBuffer.h"
62 #include "public/platform/Platform.h" 62 #include "public/platform/Platform.h"
63 63
64 namespace blink { 64 namespace blink {
65 65
66 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> WebGLRenderingContext::Factory::c reate(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, D ocument&) 66 RawPtr<CanvasRenderingContext> WebGLRenderingContext::Factory::create(HTMLCanvas Element* canvas, const CanvasContextCreationAttributes& attrs, Document&)
67 { 67 {
68 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs); 68 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs);
69 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr ibutes, 1)); 69 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr ibutes, 1));
70 if (!context) 70 if (!context)
71 return nullptr; 71 return nullptr;
72 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et()); 72 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et());
73 if (!extensionsUtil) 73 if (!extensionsUtil)
74 return nullptr; 74 return nullptr;
75 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { 75 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) {
76 String contextLabel(String::format("WebGLRenderingContext-%p", context.g et())); 76 String contextLabel(String::format("WebGLRenderingContext-%p", context.g et()));
77 context->pushGroupMarkerEXT(contextLabel.ascii().data()); 77 context->pushGroupMarkerEXT(contextLabel.ascii().data());
78 } 78 }
79 79
80 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN oop(new WebGLRenderingContext(canvas, context.release(), attributes)); 80 RawPtr<WebGLRenderingContext> renderingContext = (new WebGLRenderingContext( canvas, context.release(), attributes));
81 81
82 if (!renderingContext->drawingBuffer()) { 82 if (!renderingContext->drawingBuffer()) {
83 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Could not create a WebGL context.")); 83 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Could not create a WebGL context."));
84 return nullptr; 84 return nullptr;
85 } 85 }
86 86
87 renderingContext->initializeNewContext(); 87 renderingContext->initializeNewContext();
88 renderingContext->registerContextExtensions(); 88 renderingContext->registerContextExtensions();
89 89
90 return renderingContext.release(); 90 return renderingContext.release();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 visitor->trace(m_webglCompressedTextureASTC); 160 visitor->trace(m_webglCompressedTextureASTC);
161 visitor->trace(m_webglCompressedTextureATC); 161 visitor->trace(m_webglCompressedTextureATC);
162 visitor->trace(m_webglCompressedTextureETC1); 162 visitor->trace(m_webglCompressedTextureETC1);
163 visitor->trace(m_webglCompressedTexturePVRTC); 163 visitor->trace(m_webglCompressedTexturePVRTC);
164 visitor->trace(m_webglCompressedTextureS3TC); 164 visitor->trace(m_webglCompressedTextureS3TC);
165 visitor->trace(m_webglDepthTexture); 165 visitor->trace(m_webglDepthTexture);
166 WebGLRenderingContextBase::trace(visitor); 166 WebGLRenderingContextBase::trace(visitor);
167 } 167 }
168 168
169 } // namespace blink 169 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698