WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100745
[EFL][WK2][AC] Use smart pointers for Evas_GL types
https://bugs.webkit.org/show_bug.cgi?id=100745
Summary
[EFL][WK2][AC] Use smart pointers for Evas_GL types
Chris Dumez
Reported
2012-10-30 04:03:37 PDT
We recently started using smart pointers in WK2 EFL port. However, the accelerated compositing code is still using raw pointers for Evas_GL* objects. We should fix this.
Attachments
Patch
(20.57 KB, patch)
2012-10-30 06:22 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(21.92 KB, patch)
2012-10-31 06:24 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(21.84 KB, patch)
2012-10-31 06:59 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2012-10-30 06:22:12 PDT
Created
attachment 171433
[details]
Patch
Chris Dumez
Comment 2
2012-10-31 05:38:49 PDT
Any feedback on this patch please?
Kenneth Rohde Christiansen
Comment 3
2012-10-31 06:01:22 PDT
Comment on
attachment 171433
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171433&action=review
> Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp:33 > +EvasGLSurface::EvasGLSurface(Evas_GL* evasGl, Evas_GL_Surface* surface)
Maybe call this passSurface as you pass ownership?
> Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h:46 > + return adoptPtr(new EvasGLSurface(evasGl, surface));
// Sets m_evasGL. I suppose we should use GL and not Gl in accordance with style guide
> Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h:55 > + Evas_GL* m_evasGl;
What are you using this for? Ah it is being set by the ctor.
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:254 > + evas_gl_make_current(m_evasGl.get(), m_evasGlSurface->surface(), m_evasGlContext->context());
wouldn't ->get() not be more consistent? hmm I see that won't work as it already exists.
Chris Dumez
Comment 4
2012-10-31 06:24:36 PDT
Created
attachment 171633
[details]
Patch Take Kenneth's feedback into consideration.
Kenneth Rohde Christiansen
Comment 5
2012-10-31 06:48:40 PDT
Comment on
attachment 171633
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171633&action=review
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:471 > + evas_gl_native_surface_get(m_evasGL.get(), m_evasGLSurface->surface(), &nativeSurface); > evas_object_image_native_surface_set(sd->image, &nativeSurface); > > - evas_gl_make_current(m_evasGl, m_evasGlSurface, m_evasGlContext); > + evas_gl_make_current(m_evasGL.get(), m_evasGLSurface->surface(), m_evasGLContext->context());
why not call evasGL() instead of m_evasGL.get().
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:473 > + Evas_GL_API* gl = evas_gl_api_get(evasGL());
like here we are doing so
Chris Dumez
Comment 6
2012-10-31 06:59:45 PDT
Created
attachment 171645
[details]
Patch Take Kenneth's feedback into consideration. Good point, it looks nicer and more consistent.
WebKit Review Bot
Comment 7
2012-10-31 09:48:54 PDT
Comment on
attachment 171645
[details]
Patch Clearing flags on attachment: 171645 Committed
r133041
: <
http://trac.webkit.org/changeset/133041
>
WebKit Review Bot
Comment 8
2012-10-31 09:48:59 PDT
All reviewed patches have been landed. Closing bug.
Gyuyoung Kim
Comment 9
2012-10-31 18:39:25 PDT
Comment on
attachment 171645
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171645&action=review
Sorry for late comments. But, it seems to me there are some nits.
> Source/WebKit2/PlatformEfl.cmake:45 > + UIProcess/API/efl/EvasGLContext.cpp
Wrong alphabetical order.
> Source/WebKit2/PlatformEfl.cmake:46 > + UIProcess/API/efl/EvasGLSurface.cpp
ditto.
> Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp:35 > + , m_surface(passSurface)
passSurface ? I think surface is just enough.
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:493 > + EINA_LOG_DOM_WARN(_ewk_log_dom, "Failed to create GLContext.");
We already define WARN macro for this.
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:499 > + EINA_LOG_DOM_WARN(_ewk_log_dom, "Failed to create GLSurface.");
ditto.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug