OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 if (webframe) { | 999 if (webframe) { |
1000 FrameView* view = webframe->frameView(); | 1000 FrameView* view = webframe->frameView(); |
1001 if (view) | 1001 if (view) |
1002 view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(current
Time())); | 1002 view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(current
Time())); |
1003 } | 1003 } |
1004 #endif | 1004 #endif |
1005 } | 1005 } |
1006 | 1006 |
1007 void WebViewImpl::layout() | 1007 void WebViewImpl::layout() |
1008 { | 1008 { |
1009 #if USE(ACCELERATED_COMPOSITING) | |
1010 // FIXME: RTL style not supported by the compositor yet. | |
1011 if (isAcceleratedCompositingActive() && pageHasRTLStyle()) | |
1012 setIsAcceleratedCompositingActive(false); | |
1013 #endif | |
1014 | 1009 |
1015 WebFrameImpl* webframe = mainFrameImpl(); | 1010 WebFrameImpl* webframe = mainFrameImpl(); |
1016 if (webframe) { | 1011 if (webframe) { |
1017 // In order for our child HWNDs (NativeWindowWidgets) to update properly
, | 1012 // In order for our child HWNDs (NativeWindowWidgets) to update properly
, |
1018 // they need to be told that we are updating the screen. The problem is | 1013 // they need to be told that we are updating the screen. The problem is |
1019 // that the native widgets need to recalculate their clip region and not | 1014 // that the native widgets need to recalculate their clip region and not |
1020 // overlap any of our non-native widgets. To force the resizing, call | 1015 // overlap any of our non-native widgets. To force the resizing, call |
1021 // setFrameRect(). This will be a quick operation for most frames, but | 1016 // setFrameRect(). This will be a quick operation for most frames, but |
1022 // the NativeWindowWidgets will update a proper clipping region. | 1017 // the NativeWindowWidgets will update a proper clipping region. |
1023 FrameView* view = webframe->frameView(); | 1018 FrameView* view = webframe->frameView(); |
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2296 if (!renderView) | 2291 if (!renderView) |
2297 return false; | 2292 return false; |
2298 RenderStyle* style = renderView->style(); | 2293 RenderStyle* style = renderView->style(); |
2299 if (!style) | 2294 if (!style) |
2300 return false; | 2295 return false; |
2301 return (style->direction() == RTL); | 2296 return (style->direction() == RTL); |
2302 } | 2297 } |
2303 | 2298 |
2304 void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) | 2299 void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) |
2305 { | 2300 { |
2306 // FIXME: RTL style not supported by the compositor yet. | 2301 setIsAcceleratedCompositingActive(layer); |
2307 setIsAcceleratedCompositingActive(layer && !pageHasRTLStyle() ? true : false
); | |
2308 if (m_layerRenderer) | 2302 if (m_layerRenderer) |
2309 m_layerRenderer->setRootLayer(layer); | 2303 m_layerRenderer->setRootLayer(layer); |
2310 | 2304 |
2311 IntRect damagedRect(0, 0, m_size.width, m_size.height); | 2305 IntRect damagedRect(0, 0, m_size.width, m_size.height); |
2312 if (m_isAcceleratedCompositingActive) | 2306 if (m_isAcceleratedCompositingActive) |
2313 invalidateRootLayerRect(damagedRect); | 2307 invalidateRootLayerRect(damagedRect); |
2314 else | 2308 else |
2315 m_client->didInvalidateRect(damagedRect); | 2309 m_client->didInvalidateRect(damagedRect); |
2316 } | 2310 } |
2317 | 2311 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2494 m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(getComp
ositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyTo
HostWindow); | 2488 m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(getComp
ositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyTo
HostWindow); |
2495 if (m_temporaryOnscreenGraphicsContext3D) | 2489 if (m_temporaryOnscreenGraphicsContext3D) |
2496 m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.wid
th), std::max(1, m_size.height)); | 2490 m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.wid
th), std::max(1, m_size.height)); |
2497 return GraphicsContext3DInternal::extractWebGraphicsContext3D(m_temporar
yOnscreenGraphicsContext3D.get()); | 2491 return GraphicsContext3DInternal::extractWebGraphicsContext3D(m_temporar
yOnscreenGraphicsContext3D.get()); |
2498 } | 2492 } |
2499 #endif | 2493 #endif |
2500 return 0; | 2494 return 0; |
2501 } | 2495 } |
2502 | 2496 |
2503 } // namespace WebKit | 2497 } // namespace WebKit |
OLD | NEW |