Bug 109659 - Coordinated Graphics : Prevent code duplication of CoordinatedSurface
Summary: Coordinated Graphics : Prevent code duplication of CoordinatedSurface
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 109661
  Show dependency treegraph
 
Reported: 2013-02-12 21:11 PST by Jae Hyun Park
Modified: 2023-05-27 07:04 PDT (History)
8 users (show)

See Also:


Attachments
Patch (11.62 KB, patch)
2013-02-12 21:27 PST, Jae Hyun Park
noam: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jae Hyun Park 2013-02-12 21:11:14 PST
Many code, especially GraphicsSurface related code, will be shared between WebCoordinatedSurface and WebKit1 CoordinatedSurface.
Therefore, those code should be implemented in CoordinatedSurface.* to prevent from code duplication.
Comment 1 Jae Hyun Park 2013-02-12 21:27:02 PST
Created attachment 188005 [details]
Patch
Comment 2 Noam Rosenthal 2013-03-15 03:59:29 PDT
Comment on attachment 188005 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        Coordinated Graphics : Prevent code duplication of CoordinatedSurface

Coordinated Graphics:

> Source/WebCore/ChangeLog:10
> +        This is patch moves CoordinatedSurface implementation that will be shared
> +        between WebKit1 CoordinatedSurface and WebCoordinatedSurface to
> +        CoordinatedSurface so that it prevents code duplication.

Move some of the duplicated code to CoordinatedSurface.

> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:64
> +PassRefPtr<GraphicsSurface> CoordinatedSurface::createGraphicsSurface(const IntSize& size, Flags flags)

createWithNewGraphicsSurface

> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:84
> +    RefPtr<BitmapTextureGL> textureGL = toBitmapTextureGL(texture);
> +    if (textureGL) {

You can't assume that textureMapper is GL based. You should only do this when isBackedByOpenGL returns true.
Comment 3 Ahmad Saleem 2023-05-27 07:04:09 PDT
This code seems to modify 'CoordinatedSurface.cpp/h' files, which don't exist in WebKit anymore but this commit did seems to highlight renaming:

https://github.com/WebKit/WebKit/commit/fe9d29899711bb87766fd5cb2b2b4f3bbfead88f

So not sure, whether it is needed or not. Appreciate if someone can confirm whether it is needed or not.