Changeset 74324 in webkit
- Timestamp:
- Dec 19, 2010 9:24:07 AM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r74322 r74324 1 2010-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] [WK2] Client are expected to render their own background for WebPages 6 https://bugs.webkit.org/show_bug.cgi?id=51296 7 8 Remove the rendering of the checkerboard from the tiled DrawingAreaProxy 9 10 * UIProcess/TiledDrawingAreaProxy.cpp: 11 (WebKit::TiledDrawingAreaProxy::paint): 12 * UIProcess/TiledDrawingAreaTile.h: 13 * UIProcess/qt/TiledDrawingAreaTileQt.cpp: 14 1 15 2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com> 2 16 -
trunk/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
r74294 r74324 347 347 if (currentTile && currentTile->isReadyToPaint()) 348 348 currentTile->paint(&gc, dirtyRect); 349 else {350 IntRect tileRect = tileRectForCoordinate(currentCoordinate);351 IntRect target = intersection(tileRect, dirtyRect);352 if (target.isEmpty())353 continue;354 TiledDrawingAreaTile::paintCheckerPattern(&gc, FloatRect(target));355 }356 349 } 357 350 } -
trunk/WebKit2/UIProcess/TiledDrawingAreaTile.h
r72010 r74324 66 66 void updateFromChunk(UpdateChunk* updateChunk, float); 67 67 68 static void paintCheckerPattern(WebCore::GraphicsContext*, const WebCore::FloatRect&);69 70 68 int ID() const { return m_ID; } 71 69 -
trunk/WebKit2/UIProcess/qt/TiledDrawingAreaTileQt.cpp
r73221 r74324 40 40 41 41 namespace WebKit { 42 43 static const unsigned checkerSize = 16;44 static const unsigned checkerColor1 = 0xff555555;45 static const unsigned checkerColor2 = 0xffaaaaaa;46 47 static QPixmap& checkeredPixmap()48 {49 static QPixmap* pixmap;50 if (!pixmap) {51 pixmap = new QPixmap(checkerSize, checkerSize);52 QPainter painter(pixmap);53 QColor color1(checkerColor1);54 QColor color2(checkerColor2);55 for (unsigned y = 0; y < checkerSize; y += checkerSize / 2) {56 bool alternate = y % checkerSize;57 for (unsigned x = 0; x < checkerSize; x += checkerSize / 2) {58 painter.fillRect(x, y, checkerSize / 2, checkerSize / 2, alternate ? color1 : color2);59 alternate = !alternate;60 }61 }62 }63 return *pixmap;64 }65 42 66 43 TiledDrawingAreaTile::TiledDrawingAreaTile(TiledDrawingAreaProxy* proxy, const Coordinate& tileCoordinate) … … 140 117 } 141 118 142 void TiledDrawingAreaTile::paintCheckerPattern(GraphicsContext* context, const FloatRect& target)143 {144 QPainter* painter = context->platformContext();145 QTransform worldTransform = painter->worldTransform();146 qreal scaleX = worldTransform.m11();147 qreal scaleY = worldTransform.m22();148 149 QRect targetViewRect = QRectF(target.x() * scaleX,150 target.y() * scaleY,151 target.width() * scaleX,152 target.height() * scaleY).toAlignedRect();153 154 QTransform adjustedTransform(1., worldTransform.m12(), worldTransform.m13(),155 worldTransform.m21(), 1., worldTransform.m23(),156 worldTransform.m31(), worldTransform.m32(), worldTransform.m33());157 painter->setWorldTransform(adjustedTransform);158 159 painter->drawTiledPixmap(targetViewRect,160 checkeredPixmap(),161 QPoint(targetViewRect.left() % checkerSize,162 targetViewRect.top() % checkerSize));163 164 painter->setWorldTransform(worldTransform);165 }166 167 119 void TiledDrawingAreaTile::updateFromChunk(UpdateChunk* updateChunk, float) 168 120 {
Note: See TracChangeset
for help on using the changeset viewer.