| Differences between
and this patch
- a/Source/Platform/ChangeLog +10 lines
Lines 1-3 a/Source/Platform/ChangeLog_sec1
1
2013-04-04  Jun Jiang  <jun.a.jiang@intel.com>
2
3
        Enhance the restrictions on going through the faster hardware path for uploading Canvas2D to WebGL
4
        https://bugs.webkit.org/show_bug.cgi?id=113493
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * chromium/public/WebGraphicsContext3D.h:
9
        (WebKit::WebGraphicsContext3D::copyTextureCHROMIUM): Add a dest_type parameter.
10
1
2013-04-02  Dana Jansens  <danakj@chromium.org>
11
2013-04-02  Dana Jansens  <danakj@chromium.org>
2
12
3
        [chromium] Initialize all fields in WebFilterOperation
13
        [chromium] Initialize all fields in WebFilterOperation
- a/Source/WebCore/ChangeLog +35 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-04-04  Jun Jiang  <jun.a.jiang@intel.com>
2
3
        Enhance the restrictions on going through the faster hardware path for uploading Canvas2D to WebGL
4
        https://bugs.webkit.org/show_bug.cgi?id=113493
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Enhance the restrictions on going through the faster hardware path for uploading Canvas2D/Video to WebGL by
9
        1) Add a new parameter dest_type for copyTextureCHROMIUM() to define the destination texture if needed.
10
        2) Add a canUseCopyTextureCHROMIUM(format, type, level) function to check if copyTextureCHROMIUM() could be used
11
        for the combination of the specified format, type and level. Otherwise, it will go through the SW path.
12
13
        Already covered by current tests.
14
15
        * html/canvas/WebGLRenderingContext.cpp:
16
        (WebCore::WebGLRenderingContext::texImage2D): 
17
        * platform/chromium/support/Extensions3DChromium.cpp:
18
        (WebCore::Extensions3DChromium::canUseCopyTextureCHROMIUM):
19
        (WebCore::Extensions3DChromium::copyTextureCHROMIUM):
20
        * platform/graphics/Extensions3D.h: Add a canUseCopyTextureCHROMIUM(format, type, level) function.
21
        * platform/graphics/ImageBuffer.cpp:
22
        (WebCore::ImageBuffer::copyToPlatformTexture): Add two new parameters: dest_type and level.
23
        * platform/graphics/ImageBuffer.h:
24
        * platform/graphics/chromium/Extensions3DChromium.h:
25
        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
26
        (WebCore::Extensions3DOpenGL::canUseCopyTextureCHROMIUM):
27
        (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
28
        * platform/graphics/opengl/Extensions3DOpenGL.h:
29
        * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
30
        (WebCore::Extensions3DOpenGLES::canUseCopyTextureCHROMIUM):
31
        (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
32
        * platform/graphics/opengl/Extensions3DOpenGLES.h:
33
        * platform/graphics/skia/ImageBufferSkia.cpp:
34
        (WebCore::ImageBuffer::copyToPlatformTexture):
35
1
2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
36
2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2
37
3
        Regression(r142765) Broke Custom SVG cursors and SVG canvas drawing for Chromium
38
        Regression(r142765) Broke Custom SVG cursors and SVG canvas drawing for Chromium
- a/Source/WebKit/chromium/ChangeLog +12 lines
Lines 1-3 a/Source/WebKit/chromium/ChangeLog_sec1
1
2013-04-04  Jun Jiang  <jun.a.jiang@intel.com>
2
3
        Enhance the restrictions on going through the faster hardware path for uploading Canvas2D to WebGL
4
        https://bugs.webkit.org/show_bug.cgi?id=113493
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * public/WebMediaPlayer.h:
9
        (WebKit::WebMediaPlayer::copyVideoTextureToPlatformTexture): Add a new parameter dest_type.
10
        * src/WebMediaPlayerClientImpl.cpp:
11
        (WebKit::WebMediaPlayerClientImpl::copyVideoTextureToPlatformTexture):
12
1
2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
13
2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2
14
3
        Regression(r142765) Broke Custom SVG cursors and SVG canvas drawing for Chromium
15
        Regression(r142765) Broke Custom SVG cursors and SVG canvas drawing for Chromium
- a/Source/Platform/chromium/public/WebGraphicsContext3D.h -1 / +1 lines
Lines 440-446 public: a/Source/Platform/chromium/public/WebGraphicsContext3D.h_sec1
440
440
441
    // GL_CHROMIUM_copy_texture
441
    // GL_CHROMIUM_copy_texture
442
    virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint sourceId,
442
    virtual void copyTextureCHROMIUM(WGC3Denum target, WGC3Duint sourceId,
443
                                     WGC3Duint destId, WGC3Dint level, WGC3Denum internalFormat) { }
443
        WGC3Duint destId, WGC3Dint level, WGC3Denum internalFormat, WGC3Denum destType) { }
444
444
445
    // GL_CHROMIUM_shallow_flush
445
    // GL_CHROMIUM_shallow_flush
446
    virtual void shallowFlushCHROMIUM() { }
446
    virtual void shallowFlushCHROMIUM() { }
- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp -13 / +3 lines
Lines 3868-3880 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec1
3868
    WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
3868
    WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
3869
    // If possible, copy from the canvas element directly to the texture
3869
    // If possible, copy from the canvas element directly to the texture
3870
    // via the GPU, without a read-back to system memory.
3870
    // via the GPU, without a read-back to system memory.
3871
    //
3871
    if (GraphicsContext3D::TEXTURE_2D == target && texture) {
3872
    // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE should be lifted when
3873
    // ImageBuffer::copyToPlatformTexture implementations are fully functional.
3874
    if (GraphicsContext3D::TEXTURE_2D == target && texture && type == texture->getType(target, level)
3875
        && (format == GraphicsContext3D::RGB || format == GraphicsContext3D::RGBA) && type == GraphicsContext3D::UNSIGNED_BYTE) {
3876
        ImageBuffer* buffer = canvas->buffer();
3872
        ImageBuffer* buffer = canvas->buffer();
3877
        if (buffer && buffer->copyToPlatformTexture(*m_context.get(), texture->object(), internalformat, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
3873
        if (buffer && buffer->copyToPlatformTexture(*m_context.get(), texture->object(), internalformat, type, level, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
3878
            texture->setLevelInfo(target, level, internalformat, canvas->width(), canvas->height(), type);
3874
            texture->setLevelInfo(target, level, internalformat, canvas->width(), canvas->height(), type);
3879
            cleanupAfterGraphicsCall(false);
3875
            cleanupAfterGraphicsCall(false);
3880
            return;
3876
            return;
Lines 3913-3926 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec2
3913
3909
3914
    // Go through the fast path doing a GPU-GPU textures copy without a readback to system memory if possible.
3910
    // Go through the fast path doing a GPU-GPU textures copy without a readback to system memory if possible.
3915
    // Otherwise, it will fall back to the normal SW path.
3911
    // Otherwise, it will fall back to the normal SW path.
3916
    // FIXME: The current restrictions require that format shoud be RGB or RGBA,
3917
    // type should be UNSIGNED_BYTE and level should be 0. It may be lifted in the future.
3918
    WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
3912
    WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
3919
    if (GraphicsContext3D::TEXTURE_2D == target && texture
3913
    if (GraphicsContext3D::TEXTURE_2D == target && texture) {
3920
        && (format == GraphicsContext3D::RGB || format == GraphicsContext3D::RGBA)
3921
        && type == GraphicsContext3D::UNSIGNED_BYTE
3922
        && (texture->getType(target, level) == GraphicsContext3D::UNSIGNED_BYTE || !texture->isValid(target, level))
3923
        && !level) {
3924
        if (video->copyVideoTextureToPlatformTexture(m_context.get(), texture->object(), level, type, internalformat, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
3914
        if (video->copyVideoTextureToPlatformTexture(m_context.get(), texture->object(), level, type, internalformat, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
3925
            texture->setLevelInfo(target, level, internalformat, video->videoWidth(), video->videoHeight(), type);
3915
            texture->setLevelInfo(target, level, internalformat, video->videoWidth(), video->videoHeight(), type);
3926
            cleanupAfterGraphicsCall(false);
3916
            cleanupAfterGraphicsCall(false);
- a/Source/WebCore/platform/chromium/support/Extensions3DChromium.cpp -2 / +13 lines
Lines 175-183 void Extensions3DChromium::getQueryObjectuivEXT(Platform3DObject query, GC3Denum a/Source/WebCore/platform/chromium/support/Extensions3DChromium.cpp_sec1
175
    m_private->webContext()->getQueryObjectuivEXT(query, pname, params);
175
    m_private->webContext()->getQueryObjectuivEXT(query, pname, params);
176
}
176
}
177
177
178
void Extensions3DChromium::copyTextureCHROMIUM(GC3Denum target, Platform3DObject sourceId, Platform3DObject destId, GC3Dint level, GC3Denum internalFormat)
178
bool Extensions3DChromium::canUseCopyTextureCHROMIUM(GC3Denum destFormat, GC3Denum destType, GC3Dint level)
179
{
179
{
180
    m_private->webContext()->copyTextureCHROMIUM(target, sourceId, destId, level, internalFormat);
180
    // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lifted when
181
    // Extensions3DChromium::copyTextureCHROMIUM(...) are fully functional.
182
    if ((destFormat == GraphicsContext3D::RGB || destFormat == GraphicsContext3D::RGBA)
183
        && destType == GraphicsContext3D::UNSIGNED_BYTE
184
        && !level)
185
        return true;
186
    return false;
187
}
188
189
void Extensions3DChromium::copyTextureCHROMIUM(GC3Denum target, Platform3DObject sourceId, Platform3DObject destId, GC3Dint level, GC3Denum internalFormat, GC3Denum destType)
190
{
191
    m_private->webContext()->copyTextureCHROMIUM(target, sourceId, destId, level, internalFormat, destType);
181
}
192
}
182
193
183
void Extensions3DChromium::shallowFlushCHROMIUM()
194
void Extensions3DChromium::shallowFlushCHROMIUM()
- a/Source/WebCore/platform/graphics/Extensions3D.h -1 / +4 lines
Lines 221-227 public: a/Source/WebCore/platform/graphics/Extensions3D.h_sec1
221
    virtual String getTranslatedShaderSourceANGLE(Platform3DObject) = 0;
221
    virtual String getTranslatedShaderSourceANGLE(Platform3DObject) = 0;
222
222
223
    // GL_CHROMIUM_copy_texture
223
    // GL_CHROMIUM_copy_texture
224
    virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum) = 0;
224
    // canUseCopyTextureCHROMIUM(...) is used to check if copyTextureCHROMIUM(...) can work for the specified
225
    // format, type and level for the destination texture.
226
    virtual bool canUseCopyTextureCHROMIUM(GC3Denum destFormat, GC3Denum destType, GC3Dint level) = 0;
227
    virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum, GC3Denum) = 0;
225
228
226
    // EXT Robustness - uses getGraphicsResetStatusARB
229
    // EXT Robustness - uses getGraphicsResetStatusARB
227
    virtual void readnPixelsEXT(int x, int y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, GC3Dsizei bufSize, void *data) = 0;
230
    virtual void readnPixelsEXT(int x, int y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, GC3Dsizei bufSize, void *data) = 0;
- a/Source/WebCore/platform/graphics/ImageBuffer.cpp -1 / +1 lines
Lines 107-113 PlatformLayer* ImageBuffer::platformLayer() const a/Source/WebCore/platform/graphics/ImageBuffer.cpp_sec1
107
#endif
107
#endif
108
108
109
#if !USE(SKIA)
109
#if !USE(SKIA)
110
bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, bool, bool)
110
bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, GC3Denum, GC3Dint, bool, bool)
111
{
111
{
112
    return false;
112
    return false;
113
}
113
}
- a/Source/WebCore/platform/graphics/ImageBuffer.h -2 / +3 lines
Lines 125-132 namespace WebCore { a/Source/WebCore/platform/graphics/ImageBuffer.h_sec1
125
#endif
125
#endif
126
126
127
        // FIXME: current implementations of this method have the restriction that they only work
127
        // FIXME: current implementations of this method have the restriction that they only work
128
        // with textures that are RGB or RGBA format, and UNSIGNED_BYTE type.
128
        // with textures that are RGB or RGBA format, UNSIGNED_BYTE type and level 0, as specified in
129
        bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, bool, bool);
129
        // Extensions3D::canUseCopyTextureCHROMIUM().
130
        bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, GC3Denum, GC3Dint, bool, bool);
130
131
131
        void reportMemoryUsage(MemoryObjectInfo*) const;
132
        void reportMemoryUsage(MemoryObjectInfo*) const;
132
133
- a/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h -1 / +2 lines
Lines 123-129 public: a/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h_sec1
123
    void getQueryObjectuivEXT(Platform3DObject, GC3Denum, GC3Duint*);
123
    void getQueryObjectuivEXT(Platform3DObject, GC3Denum, GC3Duint*);
124
124
125
    // GL_CHROMIUM_copy_texture
125
    // GL_CHROMIUM_copy_texture
126
    void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum);
126
    bool canUseCopyTextureCHROMIUM(GC3Denum destFormat, GC3Denum destType, GC3Dint level);
127
    void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum, GC3Denum);
127
128
128
    // GL_CHROMIUM_shallow_flush
129
    // GL_CHROMIUM_shallow_flush
129
    virtual void shallowFlushCHROMIUM();
130
    virtual void shallowFlushCHROMIUM();
- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp -1 / +7 lines
Lines 116-122 void Extensions3DOpenGL::bindVertexArrayOES(Platform3DObject array) a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp_sec1
116
#endif
116
#endif
117
}
117
}
118
118
119
void Extensions3DOpenGL::copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum)
119
bool Extensions3DOpenGL::canUseCopyTextureCHROMIUM(GC3Denum, GC3Denum, GC3Dint)
120
{
121
    // FIXME: not implemented yet.
122
    return false;
123
}
124
125
void Extensions3DOpenGL::copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum, GC3Denum)
120
{
126
{
121
    // FIXME: implement this function and add GL_CHROMIUM_copy_texture in supports().
127
    // FIXME: implement this function and add GL_CHROMIUM_copy_texture in supports().
122
    return;
128
    return;
- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h -1 / +2 lines
Lines 47-53 public: a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h_sec1
47
    virtual void deleteVertexArrayOES(Platform3DObject);
47
    virtual void deleteVertexArrayOES(Platform3DObject);
48
    virtual GC3Dboolean isVertexArrayOES(Platform3DObject);
48
    virtual GC3Dboolean isVertexArrayOES(Platform3DObject);
49
    virtual void bindVertexArrayOES(Platform3DObject);
49
    virtual void bindVertexArrayOES(Platform3DObject);
50
    virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum);
50
    virtual bool canUseCopyTextureCHROMIUM(GC3Denum, GC3Denum, GC3Dint);
51
    virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum, GC3Denum);
51
    virtual void insertEventMarkerEXT(const String&);
52
    virtual void insertEventMarkerEXT(const String&);
52
    virtual void pushGroupMarkerEXT(const String&);
53
    virtual void pushGroupMarkerEXT(const String&);
53
    virtual void popGroupMarkerEXT(void);
54
    virtual void popGroupMarkerEXT(void);
- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp -1 / +6 lines
Lines 90-96 void Extensions3DOpenGLES::renderbufferStorageMultisample(unsigned long target, a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp_sec1
90
        notImplemented();
90
        notImplemented();
91
}
91
}
92
92
93
void Extensions3DOpenGLES::copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum)
93
bool Extensions3DOpenGLES::canUseCopyTextureCHROMIUM(GC3Denum, GC3Denum, GC3Dint)
94
{
95
    notImplemented();
96
}
97
98
void Extensions3DOpenGLES::copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum, GC3Denum)
94
{
99
{
95
    notImplemented();
100
    notImplemented();
96
}
101
}
- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h -1 / +2 lines
Lines 81-87 public: a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h_sec1
81
    // Extension3D methods
81
    // Extension3D methods
82
    virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter);
82
    virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter);
83
    virtual void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height);
83
    virtual void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height);
84
    virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum);
84
    virtual bool canUseCopyTextureCHROMIUM(GC3Denum, GC3Denum, GC3Dint);
85
    virtual void copyTextureCHROMIUM(GC3Denum, Platform3DObject, Platform3DObject, GC3Dint, GC3Denum, GC3Denum);
85
    virtual void insertEventMarkerEXT(const String&);
86
    virtual void insertEventMarkerEXT(const String&);
86
    virtual void pushGroupMarkerEXT(const String&);
87
    virtual void pushGroupMarkerEXT(const String&);
87
    virtual void popGroupMarkerEXT(void);
88
    virtual void popGroupMarkerEXT(void);
- a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp -3 / +4 lines
Lines 228-234 PlatformLayer* ImageBuffer::platformLayer() const a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp_sec1
228
    return m_data.m_layerBridge ? m_data.m_layerBridge->layer() : 0;
228
    return m_data.m_layerBridge ? m_data.m_layerBridge->layer() : 0;
229
}
229
}
230
230
231
bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D& context, Platform3DObject texture, GC3Denum internalFormat, bool premultiplyAlpha, bool flipY)
231
bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D& context, Platform3DObject texture, GC3Denum internalFormat, GC3Denum destType, GC3Dint level, bool premultiplyAlpha, bool flipY)
232
{
232
{
233
    if (!m_data.m_layerBridge || !platformLayer())
233
    if (!m_data.m_layerBridge || !platformLayer())
234
        return false;
234
        return false;
Lines 239-245 bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D& context, Platform3DOb a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp_sec2
239
        return false;
239
        return false;
240
240
241
    Extensions3D* extensions = context.getExtensions();
241
    Extensions3D* extensions = context.getExtensions();
242
    if (!extensions->supports("GL_CHROMIUM_copy_texture") || !extensions->supports("GL_CHROMIUM_flipy"))
242
    if (!extensions->supports("GL_CHROMIUM_copy_texture") || !extensions->supports("GL_CHROMIUM_flipy")
243
        || !extensions->canUseCopyTextureCHROMIUM(internalFormat, destType, level))
243
        return false;
244
        return false;
244
245
245
    // The canvas is stored in a premultiplied format, so unpremultiply if necessary.
246
    // The canvas is stored in a premultiplied format, so unpremultiply if necessary.
Lines 248-254 bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D& context, Platform3DOb a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp_sec3
248
    // The canvas is stored in an inverted position, so the flip semantics are reversed.
249
    // The canvas is stored in an inverted position, so the flip semantics are reversed.
249
    context.pixelStorei(Extensions3D::UNPACK_FLIP_Y_CHROMIUM, !flipY);
250
    context.pixelStorei(Extensions3D::UNPACK_FLIP_Y_CHROMIUM, !flipY);
250
251
251
    extensions->copyTextureCHROMIUM(GraphicsContext3D::TEXTURE_2D, sourceTexture, texture, 0, internalFormat);
252
    extensions->copyTextureCHROMIUM(GraphicsContext3D::TEXTURE_2D, sourceTexture, texture, level, internalFormat, destType);
252
253
253
    context.pixelStorei(Extensions3D::UNPACK_FLIP_Y_CHROMIUM, false);
254
    context.pixelStorei(Extensions3D::UNPACK_FLIP_Y_CHROMIUM, false);
254
    context.pixelStorei(Extensions3D::UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false);
255
    context.pixelStorei(Extensions3D::UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false);
- a/Source/WebKit/chromium/public/WebMediaPlayer.h -1 / +1 lines
Lines 154-160 public: a/Source/WebKit/chromium/public/WebMediaPlayer.h_sec1
154
    virtual unsigned videoDecodedByteCount() const = 0;
154
    virtual unsigned videoDecodedByteCount() const = 0;
155
155
156
    // Do a GPU-GPU textures copy if possible.
156
    // Do a GPU-GPU textures copy if possible.
157
    virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsigned texture, unsigned level, unsigned internalFormat, bool premultiplyAlpha, bool flipY) { return false; }
157
    virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsigned texture, unsigned level, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; }
158
158
159
    virtual WebAudioSourceProvider* audioSourceProvider() { return 0; }
159
    virtual WebAudioSourceProvider* audioSourceProvider() { return 0; }
160
160
- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp -2 / +3 lines
Lines 629-638 bool WebMediaPlayerClientImpl::copyVideoTextureToPlatformTexture(WebCore::Graphi a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp_sec1
629
    if (!context || !m_webMediaPlayer)
629
    if (!context || !m_webMediaPlayer)
630
        return false;
630
        return false;
631
    Extensions3D* extensions = context->getExtensions();
631
    Extensions3D* extensions = context->getExtensions();
632
    if (!extensions || !extensions->supports("GL_CHROMIUM_copy_texture") || !extensions->supports("GL_CHROMIUM_flipy") || !context->makeContextCurrent())
632
    if (!extensions || !extensions->supports("GL_CHROMIUM_copy_texture") || !extensions->supports("GL_CHROMIUM_flipy")
633
        || !extensions->canUseCopyTextureCHROMIUM(internalFormat, type, level) || !context->makeContextCurrent())
633
        return false;
634
        return false;
634
    WebGraphicsContext3D* webGraphicsContext3D = GraphicsContext3DPrivate::extractWebGraphicsContext3D(context);
635
    WebGraphicsContext3D* webGraphicsContext3D = GraphicsContext3DPrivate::extractWebGraphicsContext3D(context);
635
    return m_webMediaPlayer->copyVideoTextureToPlatformTexture(webGraphicsContext3D, texture, level, internalFormat, premultiplyAlpha, flipY);
636
    return m_webMediaPlayer->copyVideoTextureToPlatformTexture(webGraphicsContext3D, texture, level, internalFormat, type, premultiplyAlpha, flipY);
636
}
637
}
637
638
638
void WebMediaPlayerClientImpl::setPreload(MediaPlayer::Preload preload)
639
void WebMediaPlayerClientImpl::setPreload(MediaPlayer::Preload preload)

Return to Bug 113493