X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fhtml%2Fcanvas%2FWebGLContextAttributes.h;h=eeee443e2fa3781dce68fe9b6b91d3f01e132ab4;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=eb1a48d11aa57ec7961e10b45632115316b3c823;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/html/canvas/WebGLContextAttributes.h b/src/third_party/WebKit/Source/core/html/canvas/WebGLContextAttributes.h index eb1a48d..eeee443 100644 --- a/src/third_party/WebKit/Source/core/html/canvas/WebGLContextAttributes.h +++ b/src/third_party/WebKit/Source/core/html/canvas/WebGLContextAttributes.h @@ -34,6 +34,8 @@ namespace WebCore { +class Settings; + class WebGLContextAttributes FINAL : public CanvasContextAttributes, public ScriptWrappable { public: virtual ~WebGLContextAttributes(); @@ -41,30 +43,30 @@ public: // Create a new attributes object static PassRefPtr create(); - // Create a new attributes object initialized with preexisting attributes - static PassRefPtr create(blink::WebGraphicsContext3D::Attributes); + // Create a copy of this object. + PassRefPtr clone() const; // Whether or not the drawing buffer has an alpha channel; default=true bool alpha() const; - void setAlpha(bool alpha); + void setAlpha(bool); // Whether or not the drawing buffer has a depth buffer; default=true bool depth() const; - void setDepth(bool depth); + void setDepth(bool); - // Whether or not the drawing buffer has a stencil buffer; default=true + // Whether or not the drawing buffer has a stencil buffer; default=false bool stencil() const; - void setStencil(bool stencil); + void setStencil(bool); // Whether or not the drawing buffer is antialiased; default=true bool antialias() const; - void setAntialias(bool antialias); + void setAntialias(bool); // Whether or not to treat the values in the drawing buffer as // though their alpha channel has already been multiplied into the // color channels; default=true bool premultipliedAlpha() const; - void setPremultipliedAlpha(bool premultipliedAlpha); + void setPremultipliedAlpha(bool); // Whether or not to preserve the drawing buffer after presentation to the // screen; default=false @@ -76,17 +78,23 @@ public: bool failIfMajorPerformanceCaveat() const; void setFailIfMajorPerformanceCaveat(bool); - // Fetches a copy of the attributes stored in this object in a - // form that can be used to initialize a GraphicsContext3D. - blink::WebGraphicsContext3D::Attributes attributes() const; + // Set up the attributes that can be used to initialize a WebGraphicsContext3D. + // It's mostly based on WebGLContextAttributes, but would be adjusted based + // on settings. + blink::WebGraphicsContext3D::Attributes attributes(const blink::WebString&, Settings*) const; protected: WebGLContextAttributes(); - WebGLContextAttributes(blink::WebGraphicsContext3D::Attributes); + WebGLContextAttributes(const WebGLContextAttributes&); private: - blink::WebGraphicsContext3D::Attributes m_attrs; + bool m_alpha; + bool m_depth; + bool m_stencil; + bool m_antialias; + bool m_premultipliedAlpha; bool m_preserveDrawingBuffer; + bool m_failIfMajorPerformanceCaveat; }; } // namespace WebCore