Bug 108259

Summary: Coordinated Graphics : Remove WebCoordinatedSurface dependency from CoordinatedSurface
Product: WebKit Reporter: Jae Hyun Park <jaepark>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, cmarcelo, dongseong.hwang, gyuyoung.kim, menard, noam, rakuco, webkit.review.bot, zeno
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108149    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Remove WebCoordinatedSurface dependency from CoordinatedSurface
none
Patch none

Description Jae Hyun Park 2013-01-29 16:54:13 PST
WebCoordinatedSurface dependency should be removed from CoordinatedSurface so as to share CoordinatedSurface between WebCoordinatedSurface and CoordinatedSurface of WebKit1, which will be implemented for Threaded Coordinated Graphics.
Comment 1 Jae Hyun Park 2013-01-29 16:57:58 PST
Created attachment 185347 [details]
Patch
Comment 2 Jae Hyun Park 2013-01-29 17:04:43 PST
Created attachment 185348 [details]
Patch
Comment 3 Noam Rosenthal 2013-01-29 23:37:45 PST
Comment on attachment 185348 [details]
Patch

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

I think CoordinatedSurface::Factory can be static in CoordinatedSurface, the same way it is in GraphicsLayer.

> Source/WebKit2/ChangeLog:16
> +        that creates CoordinatedSurface. CoordinatedImageBacking and UpdateAtlas

that creates CoordinatedSurfaces.
Comment 4 Jae Hyun Park 2013-01-30 03:20:36 PST
Created attachment 185456 [details]
Patch
Comment 5 Noam Rosenthal 2013-01-30 03:22:32 PST
Comment on attachment 185456 [details]
Patch

LGTM, please ask a WK2 owner to sign off.
Comment 6 Benjamin Poulain 2013-01-30 15:45:09 PST
Comment on attachment 185456 [details]
Patch

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

I sign off on this change, Noam can review this for WebKit2.

> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedSurface.cpp:18
> +/*
> + Copyright (C) 2013 Company 100, Inc.
> +
> + This library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Library General Public
> + License as published by the Free Software Foundation; either
> + version 2 of the License, or (at your option) any later version.
> +
> + This library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + Library General Public License for more details.
> +
> + You should have received a copy of the GNU Library General Public License
> + along with this library; see the file COPYING.LIB.  If not, write to
> + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
> + Boston, MA 02110-1301, USA.
> + */

Not the standard header.

> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedSurface.cpp:24
> +#include "config.h"
> +
> +#if USE(COORDINATED_GRAPHICS)
> +
> +#include "CoordinatedSurface.h"

Should be:

#include "config.h"
#include "CoordinatedSurface.h"

#if FOOBAR

> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedSurface.cpp:43
> +#endif // USE(COORDINATED_GRAPHICS)
> +
> +} // namespace WebKit

the #define does not match the namespace scope.

> Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:119
> +    // CoordinatedSurface

Useless comment.
Comment 7 Jae Hyun Park 2013-01-30 21:16:51 PST
Created attachment 185672 [details]
Patch
Comment 8 Noam Rosenthal 2013-01-30 23:29:10 PST
Comment on attachment 185672 [details]
Patch

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

> Source/WebKit2/ChangeLog:18
> +        This patch introduces CoordinatedSurface::Factory, which is a function pointer
> +        that creates CoordinatedSurfaces. CoordinatedImageBacking and UpdateAtlas
> +        create a CoordinatedSurface using the function pointer passed by
> +        CoordinatedLayerTreeHost, instead of using CoordinatedSurface::create. This

We don't pass the function pointer to those classes, the changelog need to be updated.
Comment 9 Jae Hyun Park 2013-01-30 23:40:09 PST
Created attachment 185687 [details]
Remove WebCoordinatedSurface dependency from CoordinatedSurface
Comment 10 Jae Hyun Park 2013-01-30 23:43:06 PST
Created attachment 185689 [details]
Patch
Comment 11 Jae Hyun Park 2013-01-30 23:51:59 PST
(In reply to comment #8)
> (From update of attachment 185672 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=185672&action=review
> 
> > Source/WebKit2/ChangeLog:18
> > +        This patch introduces CoordinatedSurface::Factory, which is a function pointer
> > +        that creates CoordinatedSurfaces. CoordinatedImageBacking and UpdateAtlas
> > +        create a CoordinatedSurface using the function pointer passed by
> > +        CoordinatedLayerTreeHost, instead of using CoordinatedSurface::create. This
> 
> We don't pass the function pointer to those classes, the changelog need to be updated.

Fixed. Thanks for the review!
Comment 12 WebKit Review Bot 2013-01-31 00:31:16 PST
Comment on attachment 185689 [details]
Patch

Clearing flags on attachment: 185689

Committed r141384: <http://trac.webkit.org/changeset/141384>
Comment 13 WebKit Review Bot 2013-01-31 00:31:22 PST
All reviewed patches have been landed.  Closing bug.