Changeset 87949 in webkit
- Timestamp:
- Jun 2, 2011 1:20:34 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87948 r87949 1 2011-06-02 Alok Priyadarshi <alokp@chromium.org> 2 3 Reviewed by James Robinson. 4 5 [chromium] Things jump around when selecting anything on the page 6 https://bugs.webkit.org/show_bug.cgi?id=61639 7 8 WebCore::LayerTextureUpdaterSkPicture::updateTextureRect was not updating a tile sub-region properly. 9 It did not consider dest-rect when selecting the clip and translation required to draw the content-rect into dest-rect. 10 Also removed clearing of framebuffer because it used to clear the whole tile not just dest-rect. 11 An appropriate viewport could be set to just clear the dest-rect, but it was debug only code and I did not want to mess 12 with the viewport set by skia. 13 14 No new tests. This case should be covered by most of the layout tests (pixel) targeting selection or hovering when chromium is run in compositing mode. 15 Here is a non-exhaustive list of existing tests covering this case. 16 Test: editing/selection/14971.html (existing) 17 editing/selection/3690703-2.html (existing) 18 editing/selection/4402375.html (existing) 19 editing/selection/4818145.html (existing) 20 21 * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: 22 (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): 23 (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): 24 * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: 25 1 26 2011-06-02 Dimitri Glazkov <dglazkov@chromium.org> 2 27 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp
r87365 r87949 138 138 ASSERT(context()->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) == GraphicsContext3D::FRAMEBUFFER_COMPLETE); 139 139 140 context()->viewport(0, 0, m_bufferSize.width(), m_bufferSize.height());141 clearFrameBuffer();142 143 140 // Notify SKIA to sync its internal GL state. 144 141 m_skiaContext->resetContext(); 145 // Offset from source rectangle to this destination rectangle.146 IntPoint offset(sourceRect.x() - contentRect().x(), sourceRect.y() - contentRect().y());147 142 m_canvas->save(); 148 m_canvas->translate(-offset.x(), -offset.y()); 143 m_canvas->clipRect(SkRect(destRect)); 144 // Translate the origin of contentRect to that of destRect. 145 // Note that destRect is defined relative to sourceRect. 146 m_canvas->translate(contentRect().x() - sourceRect.x() + destRect.x(), 147 contentRect().y() - sourceRect.y() + destRect.y()); 149 148 m_canvas->drawPicture(m_picture); 150 149 m_canvas->restore(); … … 211 210 context()->bindRenderbuffer(GraphicsContext3D::RENDERBUFFER, m_depthStencilBuffer); 212 211 context()->renderbufferStorage(GraphicsContext3D::RENDERBUFFER, Extensions3D::DEPTH24_STENCIL8, m_bufferSize.width(), m_bufferSize.height()); 213 context()->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, m_depthStencilBuffer); 214 context()->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, m_depthStencilBuffer); 212 context()->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, m_depthStencilBuffer); 215 213 216 214 // Create a skia gpu canvas. … … 233 231 return true; 234 232 } 235 236 void LayerTextureUpdaterSkPicture::clearFrameBuffer()237 {238 #ifndef NDEBUG239 // Clear to green to make it easier to spot unrendered regions.240 context()->clearColor(0, 1, 0, 1);241 context()->clear(GraphicsContext3D::COLOR_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT);242 #endif243 }244 233 #endif // SKIA 245 234 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTextureUpdaterCanvas.h
r87365 r87949 92 92 void deleteFrameBuffer(); 93 93 bool createFrameBuffer(); 94 void clearFrameBuffer();95 94 96 95 GrContext* m_skiaContext; // SKIA graphics context.
Note: See TracChangeset
for help on using the changeset viewer.