Changeset 147792 in webkit
- Timestamp:
- Apr 5, 2013 1:29:44 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r147768 r147792 1 2013-04-05 Ed Bartosh <bartosh@gmail.com> 2 3 [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING) 4 https://bugs.webkit.org/show_bug.cgi?id=113627 5 6 Reviewed by Simon Fraser. 7 8 * Source/cmake/OptionsEfl.cmake: Disabled 3D_GRAPHICS and WEB_GL when accelerated compositing is on 9 1 10 2013-04-05 Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r147790 r147792 1 2013-04-05 Ed Bartosh <bartosh@gmail.com> 2 3 [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING) 4 https://bugs.webkit.org/show_bug.cgi?id=113627 5 6 Reviewed by Simon Fraser. 7 8 Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable 9 with --no-tiled-backing-store build option: 10 * page/animation/ImplicitAnimation.cpp: 11 (WebCore::ImplicitAnimation::animate): 12 * page/animation/KeyframeAnimation.cpp: 13 (WebCore::KeyframeAnimation::animate): 14 * platform/graphics/TextTrackRepresentation.cpp: 15 (NullTextTrackRepresentation): 16 * platform/graphics/TextTrackRepresentation.h: 17 (TextTrackRepresentation): 18 * testing/Internals.cpp: 19 (WebCore::Internals::resetToConsistentState): 20 (WebCore::Internals::setHeaderHeight): 21 (WebCore::Internals::setFooterHeight): 22 1 23 2013-04-05 Ryosuke Niwa <rniwa@webkit.org> 2 24 -
trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp
r145818 r147792 79 79 animatedStyle = RenderStyle::clone(targetStyle); 80 80 81 #if USE(ACCELERATED_COMPOSITING) 81 82 bool needsAnim = CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0)); 82 83 // FIXME: we also need to detect cases where we have to software animate for other reasons, 83 84 // such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902 84 #if USE(ACCELERATED_COMPOSITING)85 85 if (!needsAnim) 86 86 // If we are running an accelerated animation, set a flag in the style which causes the style -
trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp
r145818 r147792 186 186 double progress = 0.0; 187 187 fetchIntervalEndpointsForProperty(*it, fromStyle, toStyle, progress); 188 188 #if USE(ACCELERATED_COMPOSITING) 189 189 bool needsAnim = CSSPropertyAnimation::blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress); 190 #if USE(ACCELERATED_COMPOSITING)191 190 if (!needsAnim) 192 191 // If we are running an accelerated animation, set a flag in the style -
trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp
r137782 r147792 36 36 virtual ~NullTextTrackRepresentation() { } 37 37 virtual void update() { } 38 #if USE(ACCELERATED_COMPOSITING) 38 39 virtual PlatformLayer* platformLayer() { return 0; } 40 #endif 39 41 virtual void setContentScale(float) { } 40 42 virtual IntRect bounds() const { return IntRect(); } -
trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.h
r137782 r147792 53 53 54 54 virtual void update() = 0; 55 #if USE(ACCELERATED_COMPOSITING) 55 56 virtual PlatformLayer* platformLayer() = 0; 57 #endif 56 58 virtual void setContentScale(float) = 0; 57 59 virtual IntRect bounds() const = 0; -
trunk/Source/WebCore/testing/Internals.cpp
r147548 r147792 260 260 page->setPageScaleFactor(1, IntPoint(0, 0)); 261 261 page->setPagination(Pagination()); 262 if (FrameView* mainFrameView = page->mainFrame()->view()) { 262 263 #if USE(ACCELERATED_COMPOSITING) 264 FrameView* mainFrameView = page->mainFrame()->view(); 265 if (mainFrameView) { 263 266 mainFrameView->setHeaderHeight(0); 264 267 mainFrameView->setFooterHeight(0); 265 268 } 269 #endif 266 270 TextRun::setAllowsRoundingHacks(false); 267 271 WebCore::overrideUserPreferredLanguages(Vector<String>()); … … 1851 1855 if (!document || !document->view()) 1852 1856 return; 1853 1857 #if USE(ACCELERATED_COMPOSITING) 1854 1858 FrameView* frameView = document->view(); 1855 1859 frameView->setHeaderHeight(height); 1860 #endif 1856 1861 } 1857 1862 … … 1860 1865 if (!document || !document->view()) 1861 1866 return; 1862 1867 #if USE(ACCELERATED_COMPOSITING) 1863 1868 FrameView* frameView = document->view(); 1864 1869 frameView->setFooterHeight(height); 1870 #endif 1865 1871 } 1866 1872 -
trunk/Source/WebKit2/ChangeLog
r147776 r147792 1 2013-04-05 Ed Bartosh <bartosh@gmail.com> 2 3 [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING) 4 https://bugs.webkit.org/show_bug.cgi?id=113627 5 6 Reviewed by Simon Fraser. 7 8 Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable 9 with --no-tiled-backing-store build option: 10 * UIProcess/API/C/efl/WKView.cpp: 11 * UIProcess/API/efl/EvasGLContext.cpp: 12 * UIProcess/API/efl/EvasGLContext.h: 13 * UIProcess/API/efl/EvasGLSurface.cpp: 14 * UIProcess/API/efl/EvasGLSurface.h: 15 * UIProcess/API/efl/EwkView.cpp: 16 (EwkView::EwkView): 17 (EwkView::displayTimerFired): 18 (EwkView::takeSnapshot): 19 * UIProcess/API/efl/EwkView.h: 20 (WebKit): 21 (EwkView): 22 * UIProcess/API/efl/SnapshotImageGL.cpp: 23 * UIProcess/API/efl/SnapshotImageGL.h: 24 * UIProcess/PageViewportController.cpp: 25 * UIProcess/PageViewportController.h: 26 * UIProcess/efl/PageViewportControllerClientEfl.cpp: 27 * UIProcess/efl/ViewClientEfl.cpp: 28 (WebKit::ViewClientEfl::didChangeContentsSize): 29 * UIProcess/efl/WebView.cpp: 30 (WebKit::WebView::didCommitLoad): 31 (WebKit::WebView::updateViewportSize): 32 (WebKit::WebView::didChangeViewportProperties): 33 (WebKit::WebView::pageDidRequestScroll): 34 (WebKit::WebView::didRenderFrame): 35 (WebKit::WebView::pageTransitionViewportReady): 36 1 37 2013-04-05 Ed Bartosh <bartosh@gmail.com> 2 38 -
trunk/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp
r147741 r147792 108 108 } 109 109 110 #if USE(ACCELERATED_COMPOSITING) 110 111 void WKViewPaintToCurrentGLContext(WKViewRef viewRef) 111 112 { 112 113 toImpl(viewRef)->paintToCurrentGLContext(); 113 114 } 115 #endif 114 116 115 117 void WKViewPaintToCairoSurface(WKViewRef viewRef, cairo_surface_t* surface) -
trunk/Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp
r142169 r147792 25 25 26 26 #include "config.h" 27 28 #if USE(ACCELERATED_COMPOSITING) 29 27 30 #include "EvasGLContext.h" 28 31 … … 43 46 44 47 } // namespace WebKit 48 #endif -
trunk/Source/WebKit2/UIProcess/API/efl/EvasGLContext.h
r142169 r147792 26 26 #ifndef EvasGLContext_h 27 27 #define EvasGLContext_h 28 #if USE(ACCELERATED_COMPOSITING) 28 29 29 30 #include <Evas_GL.h> … … 57 58 } // namespace WebKit 58 59 60 #endif // USE(ACCELERATED_COMPOSITING) 59 61 #endif // EvasGLContext_h -
trunk/Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp
r142169 r147792 25 25 26 26 #include "config.h" 27 #if USE(ACCELERATED_COMPOSITING) 28 27 29 #include "EvasGLSurface.h" 28 30 … … 43 45 44 46 } // namespace WebKit 47 #endif -
trunk/Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h
r142169 r147792 26 26 #ifndef EvasGLSurface_h 27 27 #define EvasGLSurface_h 28 #if USE(ACCELERATED_COMPOSITING) 28 29 29 30 #include <Evas_GL.h> … … 65 66 } // namespace WebKit 66 67 68 #endif // USE(ACCELERATED_COMPOSITING) 67 69 #endif // EvasGLSurface_h -
trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp
r147741 r147792 65 65 #include <Ecore_X.h> 66 66 #include <Edje.h> 67 #if USE(ACCELERATED_COMPOSITING) 67 68 #include <Evas_GL.h> 69 #endif 68 70 #include <WebCore/CairoUtilitiesEfl.h> 69 71 #include <WebCore/Cursor.h> … … 260 262 , m_displayTimer(this, &EwkView::displayTimerFired) 261 263 , m_inputMethodContext(InputMethodContextEfl::create(this, smartData()->base.evas)) 264 #if USE(ACCELERATED_COMPOSITING) 262 265 , m_pageViewportControllerClient(PageViewportControllerClientEfl::create(this)) 263 266 , m_pageViewportController(adoptPtr(new PageViewportController(page(), m_pageViewportControllerClient.get()))) 267 #endif 264 268 , m_isAccelerated(true) 265 269 { … … 269 273 // FIXME: Remove when possible. 270 274 webView()->setEwkView(this); 271 275 #if USE(ACCELERATED_COMPOSITING) 272 276 m_evasGL = adoptPtr(evas_gl_new(evas_object_evas_get(m_evasObject))); 273 277 if (m_evasGL) … … 278 282 m_isAccelerated = false; 279 283 } 280 284 #endif 281 285 WKViewInitialize(wkView()); 282 286 283 287 WKPageGroupRef wkPageGroup = WKPageGetPageGroup(wkPage()); 284 288 WKPreferencesRef wkPreferences = WKPageGroupGetPreferences(wkPageGroup); 285 289 #if USE(ACCELERATED_COMPOSITING) 286 290 WKPreferencesSetWebGLEnabled(wkPreferences, true); 291 #endif 287 292 WKPreferencesSetFullScreenEnabled(wkPreferences, true); 288 293 WKPreferencesSetWebAudioEnabled(wkPreferences, true); … … 530 535 531 536 if (m_pendingSurfaceResize) { 537 #if USE(ACCELERATED_COMPOSITING) 532 538 // Create a GL surface here so that Evas has no chance of painting to an empty GL surface. 533 539 if (!createGLSurface()) 534 540 return; 535 541 #endif 536 542 m_pendingSurfaceResize = false; 537 543 } … … 546 552 return; 547 553 } 548 554 #if USE(ACCELERATED_COMPOSITING) 549 555 evas_gl_make_current(m_evasGL.get(), m_evasGLSurface->surface(), m_evasGLContext->context()); 550 556 551 557 WKViewPaintToCurrentGLContext(wkView()); 552 558 #endif 553 559 // sd->image is tied to a native surface, which is in the parent's coordinates. 554 560 evas_object_image_data_update_add(sd->image, sd->view.x, sd->view.y, sd->view.w, sd->view.h); … … 720 726 #endif 721 727 728 #if USE(ACCELERATED_COMPOSITING) 722 729 bool EwkView::createGLSurface() 723 730 { … … 753 760 return true; 754 761 } 762 #endif 755 763 756 764 #if ENABLE(INPUT_TYPE_COLOR) … … 1102 1110 1103 1111 WKViewSetSize(self->wkView(), WKSizeMake(width, height)); 1112 #if USE(ACCELERATED_COMPOSITING) 1104 1113 if (WKPageUseFixedLayout(self->wkPage())) 1105 1114 self->pageViewportController()->didChangeViewportSize(self->size()); 1115 #endif 1106 1116 1107 1117 self->setNeedsSurfaceResize(); … … 1270 1280 1271 1281 Ewk_View_Smart_Data* sd = smartData(); 1272 if (!m_isAccelerated) { 1273 RefPtr<cairo_surface_t> snapshot = createSurfaceForImage(sd->image); 1282 #if USE(ACCELERATED_COMPOSITING) 1283 if (m_isAccelerated) { 1284 RefPtr<cairo_surface_t> snapshot = getImageSurfaceFromFrameBuffer(0, 0, sd->view.w, sd->view.h); 1274 1285 // Resume all animations. 1275 1286 WKViewResumeActiveDOMObjectsAndAnimations(wkView()); … … 1277 1288 return snapshot.release(); 1278 1289 } 1279 1280 RefPtr<cairo_surface_t> snapshot = getImageSurfaceFromFrameBuffer(0, 0, sd->view.w, sd->view.h);1290 #endif 1291 RefPtr<cairo_surface_t> snapshot = createSurfaceForImage(sd->image); 1281 1292 // Resume all animations. 1282 1293 WKViewResumeActiveDOMObjectsAndAnimations(wkView()); -
trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h
r147741 r147792 63 63 class PageUIClientEfl; 64 64 class ViewClientEfl; 65 #if USE(ACCELERATED_COMPOSITING) 65 66 class PageViewportController; 66 67 class PageViewportControllerClientEfl; 68 #endif 67 69 class WebContextMenuItemData; 68 70 class WebContextMenuProxyEfl; … … 93 95 class EwkWindowFeatures; 94 96 97 #if USE(ACCELERATED_COMPOSITING) 95 98 typedef struct _Evas_GL_Context Evas_GL_Context; 96 99 typedef struct _Evas_GL_Surface Evas_GL_Surface; 100 #endif 97 101 98 102 typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data; … … 118 122 EwkBackForwardList* backForwardList() { return m_backForwardList.get(); } 119 123 EwkWindowFeatures* windowFeatures(); 124 125 #if USE(ACCELERATED_COMPOSITING) 120 126 WebKit::PageViewportController* pageViewportController() { return m_pageViewportController.get(); } 127 #endif 121 128 122 129 void setDeviceScaleFactor(float scale); … … 154 161 WKRect windowGeometry() const; 155 162 void setWindowGeometry(const WKRect&); 156 163 #if USE(ACCELERATED_COMPOSITING) 157 164 bool createGLSurface(); 165 #endif 158 166 void setNeedsSurfaceResize() { m_pendingSurfaceResize = true; } 159 167 … … 240 248 RefPtr<EwkContext> m_context; 241 249 RefPtr<EwkPageGroup> m_pageGroup; 250 #if USE(ACCELERATED_COMPOSITING) 242 251 OwnPtr<Evas_GL> m_evasGL; 243 252 OwnPtr<WebKit::EvasGLContext> m_evasGLContext; 244 253 OwnPtr<WebKit::EvasGLSurface> m_evasGLSurface; 254 #endif 245 255 WebCore::TransformationMatrix m_userViewportTransform; 246 256 bool m_pendingSurfaceResize; … … 274 284 OwnPtr<EwkColorPicker> m_colorPicker; 275 285 #endif 286 #if USE(ACCELERATED_COMPOSITING) 276 287 OwnPtr<WebKit::PageViewportControllerClientEfl> m_pageViewportControllerClient; 277 288 OwnPtr<WebKit::PageViewportController> m_pageViewportController; 289 #endif 278 290 bool m_isAccelerated; 279 291 -
trunk/Source/WebKit2/UIProcess/API/efl/SnapshotImageGL.cpp
r144887 r147792 25 25 26 26 #include "config.h" 27 28 #if USE(ACCELERATED_COMPOSITING) 29 27 30 #include "SnapshotImageGL.h" 28 31 … … 71 74 return newSurface; 72 75 } 76 #endif -
trunk/Source/WebKit2/UIProcess/API/efl/SnapshotImageGL.h
r142169 r147792 27 27 #define SnapshotImageGL_h 28 28 29 #if USE(ACCELERATED_COMPOSITING) 30 29 31 #include <RefPtrCairo.h> 30 32 #include <wtf/OwnArrayPtr.h> … … 32 34 PassRefPtr<cairo_surface_t> getImageSurfaceFromFrameBuffer(int x, int y, int width, int height); 33 35 36 #endif // USE(ACCELERATED_COMPOSITING) 34 37 #endif // SnapshotImageGL_h -
trunk/Source/WebKit2/UIProcess/PageViewportController.cpp
r146355 r147792 21 21 22 22 #include "config.h" 23 24 #if USE(ACCELERATED_COMPOSITING) 23 25 #include "PageViewportController.h" 24 25 #if USE(TILED_BACKING_STORE)26 26 27 27 #include "PageViewportControllerClient.h" -
trunk/Source/WebKit2/UIProcess/PageViewportController.h
r146355 r147792 22 22 #ifndef PageViewportController_h 23 23 #define PageViewportController_h 24 25 #if USE(ACCELERATED_COMPOSITING) 24 26 25 27 #include <WebCore/FloatPoint.h> … … 111 113 } // namespace WebKit 112 114 115 #endif // USE(ACCELERATED_COMPOSITING) 113 116 #endif // PageViewportController_h -
trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.cpp
r147741 r147792 26 26 27 27 #include "config.h" 28 29 #if USE(ACCELERATED_COMPOSITING) 30 28 31 #include "PageViewportControllerClientEfl.h" 29 32 … … 79 82 80 83 } // namespace WebKit 84 #endif // USE(ACCELERATED_COMPOSITING) -
trunk/Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp
r144975 r147792 50 50 EwkView* ewkView = toEwkView(clientInfo); 51 51 if (WKPageUseFixedLayout(ewkView->wkPage())) 52 #if USE(ACCELERATED_COMPOSITING) 52 53 ewkView->pageViewportController()->didChangeContentsSize(toIntSize(size)); 54 #else 55 { } 56 #endif 53 57 else 54 58 ewkView->scheduleUpdateDisplay(); -
trunk/Source/WebKit2/UIProcess/efl/WebView.cpp
r147776 r147792 235 235 { 236 236 if (m_page->useFixedLayout()) { 237 #if USE(ACCELERATED_COMPOSITING) 237 238 m_ewkView->pageViewportController()->didCommitLoad(); 239 #endif 238 240 return; 239 241 } … … 540 542 { 541 543 if (m_page->useFixedLayout()) { 544 #if USE(ACCELERATED_COMPOSITING) 542 545 m_ewkView->pageViewportController()->didChangeViewportAttributes(attr); 546 #endif 543 547 return; 544 548 } … … 548 552 void WebView::pageDidRequestScroll(const IntPoint& position) 549 553 { 550 if (m_page->useFixedLayout()) { 554 if (m_page->useFixedLayout()) { 555 #if USE(ACCELERATED_COMPOSITING) 551 556 m_ewkView->pageViewportController()->pageDidRequestScroll(position); 557 #endif 552 558 return; 553 559 } … … 561 567 { 562 568 if (m_page->useFixedLayout()) { 569 #if USE(ACCELERATED_COMPOSITING) 563 570 m_ewkView->pageViewportController()->didRenderFrame(contentsSize, coveredRect); 571 #endif 564 572 return; 565 573 } … … 570 578 { 571 579 if (m_page->useFixedLayout()) { 580 #if USE(ACCELERATED_COMPOSITING) 572 581 m_ewkView->pageViewportController()->pageTransitionViewportReady(); 582 #endif 573 583 return; 574 584 } -
trunk/Source/cmake/OptionsEfl.cmake
r147768 r147792 177 177 endif () 178 178 179 if (WTF_USE_TILED_BACKING_STORE) 180 add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1) 181 182 add_definitions(-DWTF_USE_COORDINATED_GRAPHICS=1) 183 184 set(WTF_USE_TEXTURE_MAPPER 1) 185 add_definitions(-DWTF_USE_TEXTURE_MAPPER=1) 186 187 set(WTF_USE_3D_GRAPHICS 1) 188 add_definitions(-DWTF_USE_3D_GRAPHICS=1) 189 190 set(ENABLE_3D_RENDERING 1) 191 add_definitions(-DENABLE_3D_RENDERING=1) 192 else () 193 # Disable 3D graphics and WEBGL if tiled backing is disabled 194 set(ENABLE_WEBGL 0) 195 set(WTF_USE_3D_GRAPHICS 0) 196 add_definitions(-DWTF_USE_3D_GRAPHICS=0) 197 endif () 198 179 199 if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE) 180 200 find_package(OpenGL REQUIRED) … … 232 252 endif () 233 253 234 if (WTF_USE_TILED_BACKING_STORE)235 add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1)236 237 add_definitions(-DWTF_USE_COORDINATED_GRAPHICS=1)238 239 set(WTF_USE_TEXTURE_MAPPER 1)240 add_definitions(-DWTF_USE_TEXTURE_MAPPER=1)241 242 set(WTF_USE_3D_GRAPHICS 1)243 add_definitions(-DWTF_USE_3D_GRAPHICS=1)244 245 set(ENABLE_3D_RENDERING 1)246 add_definitions(-DENABLE_3D_RENDERING=1)247 endif ()248 249 254 if (ENABLE_WEBGL) 250 255 set(ENABLE_WEBGL 1)
Note: See TracChangeset
for help on using the changeset viewer.