Changeset 165314 in webkit
- Timestamp:
- Mar 7, 2014 6:23:50 PM (10 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r165094 r165314 1 2014-03-07 Hyowon Kim <hw1008.kim@samsung.com> 2 3 [EFL] Replace GraphicsContext3D with Evas_GL in AcceleratedCompositingContext. 4 https://bugs.webkit.org/show_bug.cgi?id=129676 5 6 Reviewed by Gyuyoung Kim. 7 8 TextureMapperGL has its own GraphicsContext3D created by createForCurrentGLContext(). 9 So AcceleratedCompositingContext doesn't need to create and set it to TextureMapperGL. 10 11 We now should do 'makeCurrentContext' with a platform specific context before createForCurrentGLContext(). 12 This patch removes GraphicsContext3D related codes in AcceleratedCompositingContext 13 and adds EvasGLContext/Surface to it instead. 14 15 * WebCoreSupport/AcceleratedCompositingContextEfl.cpp: 16 (WebCore::AcceleratedCompositingContext::initialize): 17 (WebCore::AcceleratedCompositingContext::resize): 18 (WebCore::AcceleratedCompositingContext::renderLayers): 19 * WebCoreSupport/AcceleratedCompositingContextEfl.h: 20 * ewk/ewk_view.cpp: 21 * ewk/ewk_view_private.h: 22 1 23 2014-03-04 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
r163761 r165314 23 23 24 24 #include "AcceleratedCompositingContextEfl.h" 25 26 25 #include "FrameView.h" 27 #include "GraphicsContext3D.h"28 26 #include "GraphicsLayerTextureMapper.h" 29 27 #include "HostWindow.h" … … 60 58 return false; 61 59 62 m_context3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), hostWindow, WebCore::GraphicsContext3D::RenderDirectlyToHostWindow); 63 if (!m_context3D) 60 m_evasGL = adoptPtr(evas_gl_new(evas_object_evas_get(m_view))); 61 if (!m_evasGL) 62 return false; 63 64 m_evasGLContext = EvasGLContext::create(m_evasGL.get()); 65 if (!m_evasGLContext) 66 return false; 67 68 Evas_Coord width = 0; 69 Evas_Coord height = 0; 70 evas_object_geometry_get(m_view, 0, 0, &width, &height); 71 72 IntSize webViewSize(width, height); 73 if (webViewSize.isEmpty()) 74 return false; 75 76 return resize(webViewSize); 77 } 78 79 bool AcceleratedCompositingContext::resize(const IntSize& size) 80 { 81 static Evas_GL_Config evasGLConfig = { 82 EVAS_GL_RGBA_8888, 83 EVAS_GL_DEPTH_BIT_8, 84 EVAS_GL_STENCIL_NONE, 85 EVAS_GL_OPTIONS_NONE, 86 EVAS_GL_MULTISAMPLE_NONE 87 }; 88 89 m_evasGLSurface = EvasGLSurface::create(m_evasGL.get(), &evasGLConfig, size); 90 if (!m_evasGLSurface) 64 91 return false; 65 92 … … 80 107 return; 81 108 82 if (! m_context3D->makeContextCurrent())109 if (!evas_gl_make_current(m_evasGL.get(), m_evasGLSurface->surface(), m_evasGLContext->context())) 83 110 return; 84 111 85 intwidth = 0;86 intheight = 0;112 Evas_Coord width = 0; 113 Evas_Coord height = 0; 87 114 evas_object_geometry_get(m_view, 0, 0, &width, &height); 88 m_context3D->viewport(0, 0, width, height);115 evas_gl_api_get(m_evasGL.get())->glViewport(0, 0, width, height); 89 116 90 117 m_textureMapper->beginPainting(); … … 115 142 } 116 143 117 GraphicsContext3D* AcceleratedCompositingContext::context()118 {119 return m_context3D.get();120 }121 122 144 } // namespace WebCore 123 145 -
trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.h
r163079 r165314 21 21 #define AcceleratedCompositingContextEfl_h 22 22 23 #if USE(TEXTURE_MAPPER_GL) 24 #include "EvasGLContext.h" 25 #include "EvasGLSurface.h" 26 #include "TextureMapperFPSCounter.h" 23 27 #include <wtf/Noncopyable.h> 24 #include <wtf/PassOwnPtr.h> 25 26 #if USE(TEXTURE_MAPPER_GL) 27 28 #include "TextureMapperFPSCounter.h" 29 #include "ewk_private.h" 28 #include <wtf/OwnPtr.h> 30 29 31 30 namespace WebCore { 32 31 32 class GraphicsLayer; 33 33 class HostWindow; 34 34 class TextureMapper; … … 44 44 virtual void renderLayers(); 45 45 virtual void attachRootGraphicsLayer(GraphicsLayer* rootLayer); 46 virtual GraphicsContext3D* context();47 46 48 47 private: … … 50 49 51 50 virtual bool initialize(HostWindow*); 51 52 bool resize(const IntSize&); 52 53 53 54 Evas_Object* m_view; … … 57 58 TextureMapperLayer* m_rootTextureMapperLayer; 58 59 59 RefPtr<GraphicsContext3D> m_context3D; 60 OwnPtr<Evas_GL> m_evasGL; 61 OwnPtr<EvasGLContext> m_evasGLContext; 62 OwnPtr<EvasGLSurface> m_evasGLSurface; 63 60 64 TextureMapperFPSCounter m_fpsCounter; 61 65 }; -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r164168 r165314 4658 4658 } 4659 4659 4660 WebCore::GraphicsContext3D* ewk_view_accelerated_compositing_context_get(Evas_Object* ewkView)4661 {4662 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);4663 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);4664 4665 _ewk_view_accelerated_compositing_context_create_if_needed(ewkView);4666 return priv->acceleratedCompositingContext->context();4667 }4668 4669 4660 void ewk_view_root_graphics_layer_set(Evas_Object* ewkView, WebCore::GraphicsLayer* rootLayer) 4670 4661 { -
trunk/Source/WebKit/efl/ewk/ewk_view_private.h
r163079 r165314 151 151 152 152 bool ewk_view_accelerated_compositing_object_create(Evas_Object* ewkView, Evas_Native_Surface* nativeSurface, const WebCore::IntRect& rect); 153 WebCore::GraphicsContext3D* ewk_view_accelerated_compositing_context_get(Evas_Object* ewkView);154 153 void ewk_view_root_graphics_layer_set(Evas_Object* ewkView, WebCore::GraphicsLayer* rootLayer); 155 154 void ewk_view_mark_for_sync(Evas_Object* ewkView);
Note: See TracChangeset
for help on using the changeset viewer.