diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 17:32:26 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 17:35:08 +0100 |
commit | 68513a70bcd92384395513322f1b801e7bf9c729 (patch) | |
tree | 161b50f75a5921d61731bb25e730005994fcec85 /WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h | |
parent | fd5c6425ce58eb75211be7718d5dee960842a37e (diff) | |
download | external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2 |
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h')
-rw-r--r-- | WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h index 1baa0f6..3ba3c52 100644 --- a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h +++ b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h @@ -36,6 +36,7 @@ #include "Texture.h" #include <wtf/HashMap.h> +#include <wtf/HashSet.h> #include <wtf/OwnPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> @@ -69,6 +70,7 @@ public: void drawArrays(unsigned long mode, long first, long count); unsigned long getError(); void getIntegerv(unsigned long pname, int* value); + void flush(); unsigned createFramebuffer(); unsigned createTexture(); @@ -97,17 +99,30 @@ public: bool supportsBGRA(); + // GL_CHROMIUM_copy_texture_to_parent_texture + bool supportsCopyTextureToParentTextureCHROMIUM(); + void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture); + // Creates a texture associated with the given image. Is owned by this context's // TextureHashMap. Texture* createTexture(NativeImagePtr, Texture::Format, int width, int height); Texture* getTexture(NativeImagePtr); + // Multiple SharedGraphicsContext3D can exist in a single process (one per compositing context) and the same + // NativeImagePtr may be uploaded as a texture into all of them. This function removes uploaded textures + // for a given NativeImagePtr in all contexts. + static void removeTexturesFor(NativeImagePtr); + // Creates a texture that is not associated with any image. The caller takes ownership of // the texture. PassRefPtr<Texture> createTexture(Texture::Format, int width, int height); private: - SharedGraphicsContext3D(PassOwnPtr<GraphicsContext3D> context); + explicit SharedGraphicsContext3D(PassOwnPtr<GraphicsContext3D> context); + + // Used to implement removeTexturesFor(), see the comment above. + static HashSet<SharedGraphicsContext3D*>* allContexts(); + void removeTextureFor(NativeImagePtr); OwnPtr<GraphicsContext3D> m_context; |