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

Unified Diff: Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp

Issue 17230006: Implement WEBGL_shared_resources Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
diff --git a/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp b/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
index 2d9ef71e41964cd4ad7080f56a1a3a7b25ac20f0..0a0e22d65d09f8f8883a20e7bb13df4850eb6420 100644
--- a/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
+++ b/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
@@ -35,6 +35,7 @@
#include "V8CanvasRenderingContext2D.h"
#include "V8Node.h"
#include "V8WebGLRenderingContext.h"
+#include "V8WebGLShareGroup.h"
#include "bindings/v8/V8Binding.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/canvas/Canvas2DContextAttributes.h"
@@ -74,6 +75,13 @@ void V8HTMLCanvasElement::getContextMethodCustom(const v8::FunctionCallbackInfo<
v8::Handle<v8::String> preserveDrawingBuffer = v8::String::NewSymbol("preserveDrawingBuffer");
if (jsAttrs->Has(preserveDrawingBuffer))
webGLAttrs->setPreserveDrawingBuffer(jsAttrs->Get(preserveDrawingBuffer)->BooleanValue());
+ v8::Handle<v8::String> group = v8::String::NewSymbol("group");
+ if (jsAttrs->Has(group)) {
+ v8::Handle<v8::Value> value = jsAttrs->Get(group);
+ if (value->IsObject()) {
+ webGLAttrs->setGroup(V8WebGLShareGroup::toNative(value->ToObject()));
+ }
+ }
}
attrs = webGLAttrs;
} else {
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698