Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 static std::unique_ptr<WebGraphicsContext3DProvider> | 152 static std::unique_ptr<WebGraphicsContext3DProvider> |
| 153 createWebGraphicsContext3DProvider(ScriptState*, | 153 createWebGraphicsContext3DProvider(ScriptState*, |
| 154 const CanvasContextCreationAttributes&, | 154 const CanvasContextCreationAttributes&, |
| 155 unsigned webGLVersion); | 155 unsigned webGLVersion); |
| 156 static void forceNextWebGLContextCreationToFail(); | 156 static void forceNextWebGLContextCreationToFail(); |
| 157 | 157 |
| 158 unsigned version() const { return m_version; } | 158 unsigned version() const { return m_version; } |
| 159 | 159 |
| 160 int drawingBufferWidth() const; | 160 int drawingBufferWidth() const; |
| 161 int drawingBufferHeight() const; | 161 int drawingBufferHeight() const; |
| 162 DrawingBuffer* drawingBuffer() const; | |
|
Justin Novosad
2016/10/19 19:59:33
This no longer needs to be public once other comme
xlai (Olivia)
2016/10/20 15:58:54
Done.
| |
| 162 | 163 |
| 163 void activeTexture(GLenum texture); | 164 void activeTexture(GLenum texture); |
| 164 void attachShader(WebGLProgram*, WebGLShader*); | 165 void attachShader(WebGLProgram*, WebGLShader*); |
| 165 void bindAttribLocation(WebGLProgram*, GLuint index, const String& name); | 166 void bindAttribLocation(WebGLProgram*, GLuint index, const String& name); |
| 166 void bindBuffer(GLenum target, WebGLBuffer*); | 167 void bindBuffer(GLenum target, WebGLBuffer*); |
| 167 virtual void bindFramebuffer(GLenum target, WebGLFramebuffer*); | 168 virtual void bindFramebuffer(GLenum target, WebGLFramebuffer*); |
| 168 void bindRenderbuffer(GLenum target, WebGLRenderbuffer*); | 169 void bindRenderbuffer(GLenum target, WebGLRenderbuffer*); |
| 169 void bindTexture(GLenum target, WebGLTexture*); | 170 void bindTexture(GLenum target, WebGLTexture*); |
| 170 void blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); | 171 void blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); |
| 171 void blendEquation(GLenum mode); | 172 void blendEquation(GLenum mode); |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 683 PassRefPtr<Image> drawImageIntoBuffer(PassRefPtr<Image>, | 684 PassRefPtr<Image> drawImageIntoBuffer(PassRefPtr<Image>, |
| 684 int width, | 685 int width, |
| 685 int height, | 686 int height, |
| 686 const char* functionName); | 687 const char* functionName); |
| 687 | 688 |
| 688 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*); | 689 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*); |
| 689 | 690 |
| 690 // Structure for rendering to a DrawingBuffer, instead of directly | 691 // Structure for rendering to a DrawingBuffer, instead of directly |
| 691 // to the back-buffer of m_context. | 692 // to the back-buffer of m_context. |
| 692 RefPtr<DrawingBuffer> m_drawingBuffer; | 693 RefPtr<DrawingBuffer> m_drawingBuffer; |
| 693 DrawingBuffer* drawingBuffer() const; | |
| 694 | 694 |
| 695 RefPtr<WebGLContextGroup> m_contextGroup; | 695 RefPtr<WebGLContextGroup> m_contextGroup; |
| 696 | 696 |
| 697 bool m_isHidden; | 697 bool m_isHidden; |
| 698 LostContextMode m_contextLostMode; | 698 LostContextMode m_contextLostMode; |
| 699 AutoRecoveryMethod m_autoRecoveryMethod; | 699 AutoRecoveryMethod m_autoRecoveryMethod; |
| 700 // Dispatches a context lost event once it is determined that one is needed. | 700 // Dispatches a context lost event once it is determined that one is needed. |
| 701 // This is used for synthetic, WEBGL_lose_context and real context losses. For | 701 // This is used for synthetic, WEBGL_lose_context and real context losses. For |
| 702 // real ones, it's likely that there's no JavaScript on the stack, but that | 702 // real ones, it's likely that there's no JavaScript on the stack, but that |
| 703 // might be dependent on how exactly the platform discovers that the context | 703 // might be dependent on how exactly the platform discovers that the context |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1550 context, | 1550 context, |
| 1551 context->is3d(), | 1551 context->is3d(), |
| 1552 context.is3d()); | 1552 context.is3d()); |
| 1553 | 1553 |
| 1554 } // namespace blink | 1554 } // namespace blink |
| 1555 | 1555 |
| 1556 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( | 1556 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( |
| 1557 blink::WebGLRenderingContextBase::TextureUnitState); | 1557 blink::WebGLRenderingContextBase::TextureUnitState); |
| 1558 | 1558 |
| 1559 #endif // WebGLRenderingContextBase_h | 1559 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |