| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 405 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 406 public: | 406 public: |
| 407 Member<WebGLTexture> m_texture2DBinding; | 407 Member<WebGLTexture> m_texture2DBinding; |
| 408 Member<WebGLTexture> m_textureCubeMapBinding; | 408 Member<WebGLTexture> m_textureCubeMapBinding; |
| 409 Member<WebGLTexture> m_texture3DBinding; | 409 Member<WebGLTexture> m_texture3DBinding; |
| 410 Member<WebGLTexture> m_texture2DArrayBinding; | 410 Member<WebGLTexture> m_texture2DArrayBinding; |
| 411 | 411 |
| 412 DECLARE_TRACE(); | 412 DECLARE_TRACE(); |
| 413 }; | 413 }; |
| 414 | 414 |
| 415 PassRefPtr<Image> getImage(SnapshotReason) const override; |
| 415 void setFilterQuality(SkFilterQuality) override; | 416 void setFilterQuality(SkFilterQuality) override; |
| 416 bool isWebGL2OrHigher() { return version() >= 2; } | 417 bool isWebGL2OrHigher() { return version() >= 2; } |
| 417 | 418 |
| 418 void getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffscreenCanvas&) const; | 419 void getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffscreenCanvas&) const; |
| 419 | 420 |
| 420 protected: | 421 protected: |
| 421 friend class EXTDisjointTimerQuery; | 422 friend class EXTDisjointTimerQuery; |
| 422 friend class WebGLDrawBuffers; | 423 friend class WebGLDrawBuffers; |
| 423 friend class WebGLFramebuffer; | 424 friend class WebGLFramebuffer; |
| 424 friend class WebGLObject; | 425 friend class WebGLObject; |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 String ensureNotNull(const String&) const; | 1031 String ensureNotNull(const String&) const; |
| 1031 | 1032 |
| 1032 // Enable or disable stencil test based on user setting and | 1033 // Enable or disable stencil test based on user setting and |
| 1033 // whether the current FBO has a stencil buffer. | 1034 // whether the current FBO has a stencil buffer. |
| 1034 void applyStencilTest(); | 1035 void applyStencilTest(); |
| 1035 | 1036 |
| 1036 // Helper for enabling or disabling a capability. | 1037 // Helper for enabling or disabling a capability. |
| 1037 void enableOrDisable(GLenum capability, bool enable); | 1038 void enableOrDisable(GLenum capability, bool enable); |
| 1038 | 1039 |
| 1039 // Clamp the width and height to GL_MAX_VIEWPORT_DIMS. | 1040 // Clamp the width and height to GL_MAX_VIEWPORT_DIMS. |
| 1040 IntSize clampedCanvasSize(); | 1041 IntSize clampedCanvasSize() const; |
| 1041 | 1042 |
| 1042 // First time called, if EXT_draw_buffers is supported, query the value; oth
erwise return 0. | 1043 // First time called, if EXT_draw_buffers is supported, query the value; oth
erwise return 0. |
| 1043 // Later, return the cached value. | 1044 // Later, return the cached value. |
| 1044 GLint maxDrawBuffers(); | 1045 GLint maxDrawBuffers(); |
| 1045 GLint maxColorAttachments(); | 1046 GLint maxColorAttachments(); |
| 1046 | 1047 |
| 1047 void setBackDrawBuffer(GLenum); | 1048 void setBackDrawBuffer(GLenum); |
| 1048 void setFramebuffer(GLenum, WebGLFramebuffer*); | 1049 void setFramebuffer(GLenum, WebGLFramebuffer*); |
| 1049 | 1050 |
| 1050 virtual void restoreCurrentFramebuffer(); | 1051 virtual void restoreCurrentFramebuffer(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 bool isPaintable() const final { return drawingBuffer(); } | 1123 bool isPaintable() const final { return drawingBuffer(); } |
| 1123 }; | 1124 }; |
| 1124 | 1125 |
| 1125 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1126 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1126 | 1127 |
| 1127 } // namespace blink | 1128 } // namespace blink |
| 1128 | 1129 |
| 1129 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1130 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1130 | 1131 |
| 1131 #endif // WebGLRenderingContextBase_h | 1132 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |