| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 // GL_CHROMIUM_subscribe_uniform | 370 // GL_CHROMIUM_subscribe_uniform |
| 371 PassRefPtrWillBeRawPtr<CHROMIUMValuebuffer> createValuebufferCHROMIUM(); | 371 PassRefPtrWillBeRawPtr<CHROMIUMValuebuffer> createValuebufferCHROMIUM(); |
| 372 void deleteValuebufferCHROMIUM(CHROMIUMValuebuffer*); | 372 void deleteValuebufferCHROMIUM(CHROMIUMValuebuffer*); |
| 373 GLboolean isValuebufferCHROMIUM(CHROMIUMValuebuffer*); | 373 GLboolean isValuebufferCHROMIUM(CHROMIUMValuebuffer*); |
| 374 void bindValuebufferCHROMIUM(GLenum target, CHROMIUMValuebuffer*); | 374 void bindValuebufferCHROMIUM(GLenum target, CHROMIUMValuebuffer*); |
| 375 void subscribeValueCHROMIUM(GLenum target, GLenum subscription); | 375 void subscribeValueCHROMIUM(GLenum target, GLenum subscription); |
| 376 void populateSubscribedValuesCHROMIUM(GLenum target); | 376 void populateSubscribedValuesCHROMIUM(GLenum target); |
| 377 void uniformValuebufferCHROMIUM(const WebGLUniformLocation*, GLenum target,
GLenum subscription); | 377 void uniformValuebufferCHROMIUM(const WebGLUniformLocation*, GLenum target,
GLenum subscription); |
| 378 | 378 |
| 379 virtual void trace(Visitor*) override; | 379 DECLARE_VIRTUAL_TRACE(); |
| 380 | 380 |
| 381 // Returns approximate gpu memory allocated per pixel. | 381 // Returns approximate gpu memory allocated per pixel. |
| 382 int externallyAllocatedBytesPerPixel(); | 382 int externallyAllocatedBytesPerPixel(); |
| 383 | 383 |
| 384 class TextureUnitState { | 384 class TextureUnitState { |
| 385 ALLOW_ONLY_INLINE_ALLOCATION(); | 385 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 386 public: | 386 public: |
| 387 RefPtrWillBeMember<WebGLTexture> m_texture2DBinding; | 387 RefPtrWillBeMember<WebGLTexture> m_texture2DBinding; |
| 388 RefPtrWillBeMember<WebGLTexture> m_textureCubeMapBinding; | 388 RefPtrWillBeMember<WebGLTexture> m_textureCubeMapBinding; |
| 389 | 389 |
| 390 void trace(Visitor*); | 390 DECLARE_TRACE(); |
| 391 }; | 391 }; |
| 392 | 392 |
| 393 void setFilterLevel(SkPaint::FilterLevel); | 393 void setFilterLevel(SkPaint::FilterLevel); |
| 394 | 394 |
| 395 protected: | 395 protected: |
| 396 friend class WebGLDrawBuffers; | 396 friend class WebGLDrawBuffers; |
| 397 friend class WebGLFramebuffer; | 397 friend class WebGLFramebuffer; |
| 398 friend class WebGLObject; | 398 friend class WebGLObject; |
| 399 friend class WebGLContextObject; | 399 friend class WebGLContextObject; |
| 400 friend class OESVertexArrayObject; | 400 friend class OESVertexArrayObject; |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 } | 620 } |
| 621 | 621 |
| 622 const char* const* prefixes() const; | 622 const char* const* prefixes() const; |
| 623 bool matchesNameWithPrefixes(const String&) const; | 623 bool matchesNameWithPrefixes(const String&) const; |
| 624 | 624 |
| 625 virtual PassRefPtrWillBeRawPtr<WebGLExtension> getExtension(WebGLRenderi
ngContextBase*) = 0; | 625 virtual PassRefPtrWillBeRawPtr<WebGLExtension> getExtension(WebGLRenderi
ngContextBase*) = 0; |
| 626 virtual bool supported(WebGLRenderingContextBase*) const = 0; | 626 virtual bool supported(WebGLRenderingContextBase*) const = 0; |
| 627 virtual const char* extensionName() const = 0; | 627 virtual const char* extensionName() const = 0; |
| 628 virtual void loseExtension() = 0; | 628 virtual void loseExtension() = 0; |
| 629 | 629 |
| 630 virtual void trace(Visitor*) { } | 630 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 631 | 631 |
| 632 private: | 632 private: |
| 633 bool m_draft; | 633 bool m_draft; |
| 634 const char* const* m_prefixes; | 634 const char* const* m_prefixes; |
| 635 }; | 635 }; |
| 636 | 636 |
| 637 template <typename T> | 637 template <typename T> |
| 638 class TypedExtensionTracker final : public ExtensionTracker { | 638 class TypedExtensionTracker final : public ExtensionTracker { |
| 639 public: | 639 public: |
| 640 static PassOwnPtrWillBeRawPtr<TypedExtensionTracker<T>> create(RefPtrWil
lBeMember<T>& extensionField, ExtensionFlags flags, const char* const* prefixes) | 640 static PassOwnPtrWillBeRawPtr<TypedExtensionTracker<T>> create(RefPtrWil
lBeMember<T>& extensionField, ExtensionFlags flags, const char* const* prefixes) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 | 674 |
| 675 virtual void loseExtension() override | 675 virtual void loseExtension() override |
| 676 { | 676 { |
| 677 if (m_extension) { | 677 if (m_extension) { |
| 678 m_extension->lose(false); | 678 m_extension->lose(false); |
| 679 if (m_extension->isLost()) | 679 if (m_extension->isLost()) |
| 680 m_extension = nullptr; | 680 m_extension = nullptr; |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 | 683 |
| 684 virtual void trace(Visitor* visitor) override | 684 DEFINE_INLINE_VIRTUAL_TRACE() |
| 685 { | 685 { |
| 686 visitor->trace(m_extension); | 686 visitor->trace(m_extension); |
| 687 ExtensionTracker::trace(visitor); | 687 ExtensionTracker::trace(visitor); |
| 688 } | 688 } |
| 689 | 689 |
| 690 private: | 690 private: |
| 691 TypedExtensionTracker(RefPtrWillBeMember<T>& extensionField, ExtensionFl
ags flags, const char* const* prefixes) | 691 TypedExtensionTracker(RefPtrWillBeMember<T>& extensionField, ExtensionFl
ags flags, const char* const* prefixes) |
| 692 : ExtensionTracker(flags, prefixes) | 692 : ExtensionTracker(flags, prefixes) |
| 693 , m_extensionField(extensionField) | 693 , m_extensionField(extensionField) |
| 694 { | 694 { |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 static IntSize oldestContextSize(); | 989 static IntSize oldestContextSize(); |
| 990 }; | 990 }; |
| 991 | 991 |
| 992 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 992 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 993 | 993 |
| 994 } // namespace blink | 994 } // namespace blink |
| 995 | 995 |
| 996 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 996 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 997 | 997 |
| 998 #endif // WebGLRenderingContextBase_h | 998 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |