Bug 98147

Summary: Implement GraphicsSurface for Windows.
Product: WebKit Reporter: Zeno Albisser <zeno>
Component: WebKit2Assignee: Zeno Albisser <zeno>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, hausmann, noam, vestbo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 98501, 99709    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Zeno Albisser 2012-10-02 04:41:01 PDT
GraphicsSurface is used to share textures between the WebProcess and the UIProcess.
Currently there are only implementations for Mac and Linux/GLX.
We should make it available for Windows as well to allow for WebGL.
ANGLE can be used to map GL calls to DirectX.
Comment 1 Zeno Albisser 2012-10-24 02:45:36 PDT
Created attachment 170348 [details]
Patch
Comment 2 WebKit Review Bot 2012-10-24 02:47:51 PDT
Attachment 170348 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:351:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:353:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Zeno Albisser 2012-10-24 02:54:25 PDT
Comment on attachment 170348 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=170348&action=review

>> Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:353
>> +             1,  1
> 
> Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]

Indentation is like that on purpose.
Comment 4 Kenneth Rohde Christiansen 2012-10-24 03:12:44 PDT
Comment on attachment 170348 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=170348&action=review

> Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:6
> +/*
> +
> + Copyright (C) 2012 Zeno Albisser <zeno@webkit.org>
> +
> + This library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Library General Public

I think we normally have *'s here in the beginning of each line

> Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:79
> +        initShaderProgram();

webkit usually uses initialize*

> Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:488
> +    if (m_private)
> +        delete m_private;

That if is not needed
Comment 5 Zeno Albisser 2012-10-24 05:28:27 PDT
(In reply to comment #4)
> I think we normally have *'s here in the beginning of each line
Depends on the licence header, we have both. I aligned with GraphicsContext3DQt.cpp, GraphicsSurface.h, GraphicsSurface.cpp and others.

> webkit usually uses initialize*
I'll fix that.

> > +    if (m_private)
> > +        delete m_private;
> That if is not needed
i'll fix that as well.
Comment 6 Zeno Albisser 2012-10-24 05:30:49 PDT
Created attachment 170374 [details]
Patch
Comment 7 WebKit Review Bot 2012-10-24 05:33:40 PDT
Attachment 170374 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:351:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:353:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Kenneth Rohde Christiansen 2012-10-24 05:44:53 PDT
Comment on attachment 170374 [details]
Patch

r=me as this is at least a good start
Comment 9 Zeno Albisser 2012-10-24 06:19:07 PDT
Comment on attachment 170374 [details]
Patch

Clearing flags on attachment: 170374

Committed r132343: <http://trac.webkit.org/changeset/132343>
Comment 10 Zeno Albisser 2012-10-24 06:19:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Simon Hausmann 2012-10-25 01:13:16 PDT
Comment on attachment 170374 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=170374&action=review

> Source/WebCore/platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:3
> + Copyright (C) 2012 Zeno Albisser <zeno@webkit.org>

Shouldn't this at least include Digia?
Comment 12 Zeno Albisser 2012-10-25 02:43:38 PDT
> Shouldn't this at least include Digia?
I will add this the next time i touch the file.