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

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

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 CanvasRenderingContext* create( 62 CanvasRenderingContext* create(
63 ScriptState*, 63 ScriptState*,
64 OffscreenCanvas*, 64 OffscreenCanvas*,
65 const CanvasContextCreationAttributes&) override; 65 const CanvasContextCreationAttributes&) override;
66 CanvasRenderingContext::ContextType getContextType() const override { 66 CanvasRenderingContext::ContextType getContextType() const override {
67 return CanvasRenderingContext::ContextWebgl; 67 return CanvasRenderingContext::ContextWebgl;
68 } 68 }
69 void onError(HTMLCanvasElement*, const String& error) override; 69 void onError(HTMLCanvasElement*, const String& error) override;
70 }; 70 };
71 71
72 ~WebGLRenderingContext() override;
73
74 CanvasRenderingContext::ContextType getContextType() const override { 72 CanvasRenderingContext::ContextType getContextType() const override {
75 return CanvasRenderingContext::ContextWebgl; 73 return CanvasRenderingContext::ContextWebgl;
76 } 74 }
77 ImageBitmap* transferToImageBitmap(ScriptState*) final; 75 ImageBitmap* transferToImageBitmap(ScriptState*) final;
78 String contextName() const override { return "WebGLRenderingContext"; } 76 String contextName() const override { return "WebGLRenderingContext"; }
79 void registerContextExtensions() override; 77 void registerContextExtensions() override;
80 void setCanvasGetContextResult(RenderingContext&) final; 78 void setCanvasGetContextResult(RenderingContext&) final;
81 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final; 79 void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) final;
82 80
83 EAGERLY_FINALIZE();
84 DECLARE_VIRTUAL_TRACE(); 81 DECLARE_VIRTUAL_TRACE();
85 82
86 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 83 DECLARE_VIRTUAL_TRACE_WRAPPERS();
87 84
88 private: 85 private:
89 WebGLRenderingContext(HTMLCanvasElement*, 86 WebGLRenderingContext(HTMLCanvasElement*,
90 std::unique_ptr<WebGraphicsContext3DProvider>, 87 std::unique_ptr<WebGraphicsContext3DProvider>,
91 const CanvasContextCreationAttributes&); 88 const CanvasContextCreationAttributes&);
92 WebGLRenderingContext(OffscreenCanvas*, 89 WebGLRenderingContext(OffscreenCanvas*,
93 std::unique_ptr<WebGraphicsContext3DProvider>, 90 std::unique_ptr<WebGraphicsContext3DProvider>,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 context, 124 context,
128 context->is3d() && 125 context->is3d() &&
129 WebGLRenderingContextBase::getWebGLVersion(context) == 1, 126 WebGLRenderingContextBase::getWebGLVersion(context) == 1,
130 context.is3d() && 127 context.is3d() &&
131 WebGLRenderingContextBase::getWebGLVersion(&context) == 128 WebGLRenderingContextBase::getWebGLVersion(&context) ==
132 1); 129 1);
133 130
134 } // namespace blink 131 } // namespace blink
135 132
136 #endif // WebGLRenderingContext_h 133 #endif // WebGLRenderingContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698