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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp

Issue 2698573002: Support offscreen contexts which own their backing surface (Closed)
Patch Set: Rebase and retry again Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp b/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
index bf24b48cc493db93e2ab13e909380e1816151277..8c07036eba54d51150e64e898454332e50f55c89 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
@@ -23,10 +23,19 @@ WebGLContextAttributes toWebGLContextAttributes(
Platform::ContextAttributes toPlatformContextAttributes(
const CanvasContextCreationAttributes& attrs,
- unsigned webGLVersion) {
+ unsigned webGLVersion,
+ bool supportOwnOffscreenSurface) {
Platform::ContextAttributes result;
result.failIfMajorPerformanceCaveat = attrs.failIfMajorPerformanceCaveat();
result.webGLVersion = webGLVersion;
+ if (supportOwnOffscreenSurface) {
+ // Only ask for alpha/depth/stencil/antialias if we may be using the default
+ // framebuffer. They are not needed for standard offscreen rendering.
+ result.supportAlpha = attrs.alpha();
+ result.supportDepth = attrs.depth();
+ result.supportStencil = attrs.stencil();
+ result.supportAntialias = attrs.antialias();
+ }
return result;
}

Powered by Google App Engine
This is Rietveld 408576698