Changeset 69777 in webkit
- Timestamp:
- Oct 14, 2010 10:31:13 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r68761 r69777 298 298 } 299 299 #endif 300 #if USE(ACCELERATED_COMPOSITING) 300 #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER) 301 301 page()->mainFrame()->render(painter, d->overlay() ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect()); 302 302 #else -
trunk/WebKit/qt/Api/qwebframe.cpp
r69009 r69777 97 97 #include "runtime_root.h" 98 98 #endif 99 #if USE(TEXTURE_MAPPER) 100 #include "texmap/TextureMapperPlatformLayer.h" 101 #endif 99 102 #include "wtf/HashMap.h" 100 103 #include <QMultiMap> … … 292 295 painter->restore(); 293 296 } 297 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 298 // TextureMapper might use raw OpenGL or some other backend that requires native painting. On raster this doesn't have any effect. 299 if (rootGraphicsLayer) { 300 painter->beginNativePainting(); 301 rootGraphicsLayer->paint(context, view->size(), view->frameRect(), IntRect(clip.boundingRect()), TransformationMatrix(), painter->opacity()); 302 painter->endNativePainting(); 303 } 304 305 renderRelativeCoords(context, (QWebFrame::RenderLayer)(QWebFrame::ScrollBarLayer | QWebFrame::PanIconLayer), clip); 306 #endif 294 307 } 295 308 #endif … … 309 322 view->updateLayoutAndStyleIfNeededRecursive(); 310 323 311 for (int i = 0; i < vector.size(); ++i) { 312 const QRect& clipRect = vector.at(i); 313 314 QRect intersectedRect = clipRect.intersected(view->frameRect()); 315 324 if (layer & QWebFrame::ContentsLayer) { 316 325 painter->save(); 317 painter->setClipRect(clipRect, Qt::IntersectClip); 318 319 int x = view->x(); 320 int y = view->y(); 321 322 if (layer & QWebFrame::ContentsLayer) { 326 for (int i = 0; i < vector.size(); ++i) { 327 const QRect& clipRect = vector.at(i); 328 329 QRect intersectedRect = clipRect.intersected(view->frameRect()); 330 331 painter->setClipRect(clipRect, Qt::IntersectClip); 332 333 int x = view->x(); 334 int y = view->y(); 335 323 336 context->save(); 324 337 … … 337 350 context->restore(); 338 351 } 339 340 if (layer & QWebFrame::ScrollBarLayer 341 && !view->scrollbarsSuppressed() 342 && (view->horizontalScrollbar() || view->verticalScrollbar())) { 343 context->save(); 344 345 QRect rect = intersectedRect; 346 context->translate(x, y); 347 rect.translate(-x, -y); 348 349 view->paintScrollbars(context, rect); 350 351 context->restore(); 352 painter->restore(); 353 354 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 355 if (rootGraphicsLayer) { 356 painter->save(); 357 painter->beginNativePainting(); 358 rootGraphicsLayer->paint(context, view->size(), view->frameRect(), IntRect(clip.boundingRect()), 359 TransformationMatrix(), context->platformContext()->opacity()); 360 painter->endNativePainting(); 361 painter->restore(); 352 362 } 363 #endif 364 } 365 if (layer & (QWebFrame::PanIconLayer | QWebFrame::ScrollBarLayer)) { 366 for (int i = 0; i < vector.size(); ++i) { 367 const QRect& clipRect = vector.at(i); 368 369 QRect intersectedRect = clipRect.intersected(view->frameRect()); 370 371 painter->save(); 372 painter->setClipRect(clipRect, Qt::IntersectClip); 373 374 int x = view->x(); 375 int y = view->y(); 376 377 if (layer & QWebFrame::ScrollBarLayer 378 && !view->scrollbarsSuppressed() 379 && (view->horizontalScrollbar() || view->verticalScrollbar())) { 380 context->save(); 381 382 QRect rect = intersectedRect; 383 context->translate(x, y); 384 rect.translate(-x, -y); 385 386 view->paintScrollbars(context, rect); 387 388 context->restore(); 389 } 353 390 354 391 #if ENABLE(PAN_SCROLLING) 355 if (layer & QWebFrame::PanIconLayer)356 view->paintPanScrollIcon(context);392 if (layer & QWebFrame::PanIconLayer) 393 view->paintPanScrollIcon(context); 357 394 #endif 358 395 359 painter->restore(); 396 painter->restore(); 397 } 360 398 } 361 399 } -
trunk/WebKit/qt/ChangeLog
r69688 r69777 1 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Texmap] [Qt] Texture mapper initial implementation 6 https://bugs.webkit.org/show_bug.cgi?id=47070 7 8 Allow rendering of accelerated-compositing with TextureMapper, inside a QWebFrame. The frame will render the regular content, 9 either normally or through tiled backingstore, then let the TextureMapper layer render itself to the active context, and 10 then render the scrollbar and pan icon. This is different from the current implementation, which uses additional QGraphicsItems for AC 11 and the scrollbar overlay. 12 13 * Api/qgraphicswebview.cpp: 14 (QGraphicsWebView::paint): 15 * Api/qwebframe.cpp: 16 (QWebFramePrivate::renderFromTiledBackingStore): 17 (QWebFramePrivate::renderRelativeCoords): 18 1 19 2010-10-13 Gavin Barraclough <barraclough@apple.com> 2 20
Note: See TracChangeset
for help on using the changeset viewer.