[Webkit-unassigned] [Bug 62961] [EFL] Add GraphicsContext3DInternal implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 22 04:18:27 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62961





--- Comment #18 from Hyowon Kim <hw1008.kim at samsung.com>  2011-06-22 04:18:26 PST ---
(In reply to comment #16)
> (In reply to comment #12)
> > Informal r- from my side:
> > 
> > > Source/WebCore/platform/graphics/efl/GraphicsContext3DInternal.cpp:57
> > > +bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, bool bRenderDirectlyToEvasGLObject)
> > 
> > I'd rather if instead of having a public constructor and this method you could have a static create() method which took care of creating and initializing the object automatically.
> > 
> GraphicsContext3DInternal::initialize() calls many Evas_GL's create functions. 
> If one of them fails, initialize() returns false, and then the GraphicsContext3DInternal instance will be destroyed.
> According to your comment about a static create() function, I made the following codes.
> static PassOwnPtr<GraphicsContext3DInternal> GraphicsContext3DInternal::create(a, b, c)
> {
>      OwnPtr<GraphicsContext3DInternal> internal = adoptPtr(new GraphicsContext3DInternal());
>      if (!internal->initialize(a, b, c))
>         return 0;
>      return internal.release();    
> }
> But it couldn't return 0 due to the following compile error.
> error: conversion from 'int' to non-scalar type 'WTF::PassOwnPtr<WebCore::GraphicsContext3DInternal>' requested
> So creating and initailizing a instance at once in the static GraphicsContext3DInternal::create() function seems to be difficult because of its return type.
> GraphicsContext3DInternal instances are created only in GraphicsContext3D::create(), so I think that current implementation might be good.

Sorry, I should have used "return nullptr;" instead of 0!!!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list