Changeset 95365 in webkit
- Timestamp:
- Sep 16, 2011 9:39:45 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95362 r95365 1 2011-09-16 Shawn Singh <shawnsingh@chromium.org> 2 3 Remove m_contentsDirty from LayerChromium because it 4 is redundant with m_dirtyRect. 5 https://bugs.webkit.org/show_bug.cgi?id=68213 6 7 Reviewed by James Robinson. 8 9 Code cleanup towards unit testing. 10 11 * platform/graphics/chromium/Canvas2DLayerChromium.cpp: 12 (WebCore::Canvas2DLayerChromium::updateCompositorResources): 13 * platform/graphics/chromium/ContentLayerChromium.cpp: 14 (WebCore::ContentLayerChromium::paintContentsIfDirty): 15 * platform/graphics/chromium/ImageLayerChromium.cpp: 16 (WebCore::ImageLayerChromium::paintContentsIfDirty): 17 * platform/graphics/chromium/LayerChromium.cpp: 18 (WebCore::LayerChromium::LayerChromium): 19 (WebCore::LayerChromium::setNeedsDisplay): 20 (WebCore::LayerChromium::resetNeedsDisplay): 21 * platform/graphics/chromium/LayerChromium.h: 22 * platform/graphics/chromium/VideoLayerChromium.cpp: 23 (WebCore::VideoLayerChromium::updateCompositorResources): 24 * platform/graphics/chromium/WebGLLayerChromium.cpp: 25 (WebCore::WebGLLayerChromium::updateCompositorResources): 26 1 27 2011-09-16 Dmitry Lomov <dslomov@google.com> 2 28 -
trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
r95114 r95365 67 67 void Canvas2DLayerChromium::updateCompositorResources(GraphicsContext3D*) 68 68 { 69 if ( !m_contentsDirty|| !drawsContent())69 if (m_dirtyRect.isEmpty() || !drawsContent()) 70 70 return; 71 71 72 if (m_contentsDirty) { 73 if (m_context) { 72 if (m_context) { 74 73 #if USE(SKIA) 75 76 77 78 79 74 GrContext* grContext = m_context->grContext(); 75 if (grContext) { 76 m_context->makeContextCurrent(); 77 grContext->flush(); 78 } 80 79 #endif 81 m_context->flush(); 82 } 83 m_contentsDirty = false; 80 m_context->flush(); 84 81 } 82 resetNeedsDisplay(); 85 83 } 86 84 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
r95320 r95365 111 111 112 112 prepareToUpdate(layerRect); 113 m_dirtyRect = FloatRect();113 resetNeedsDisplay(); 114 114 } 115 115 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
r95148 r95365 153 153 if (!m_dirtyRect.isEmpty()) { 154 154 invalidateRect(paintRect); 155 m_dirtyRect = IntRect();155 resetNeedsDisplay(); 156 156 } 157 157 } -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r95348 r95365 59 59 LayerChromium::LayerChromium(CCLayerDelegate* delegate) 60 60 : m_delegate(delegate) 61 , m_contentsDirty(false)62 61 , m_layerId(s_nextLayerId++) 63 62 , m_parent(0) … … 275 274 // setNeedsCommit will schedule a fresh compositing pass. 276 275 // For the root layer, setNeedsCommit has no effect. 277 m_contentsDirty = true;278 279 276 m_dirtyRect.unite(dirtyRect); 280 277 setNeedsCommit(); … … 285 282 m_dirtyRect.setLocation(FloatPoint()); 286 283 m_dirtyRect.setSize(bounds()); 287 m_contentsDirty = true;288 284 setNeedsCommit(); 289 285 } … … 292 288 { 293 289 m_dirtyRect = FloatRect(); 294 m_contentsDirty = false;295 290 } 296 291 -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r95348 r95365 223 223 224 224 FloatRect m_dirtyRect; 225 bool m_contentsDirty;226 225 227 226 RefPtr<LayerChromium> m_maskLayer; -
trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp
r95148 r95365 80 80 void VideoLayerChromium::updateCompositorResources(GraphicsContext3D* context) 81 81 { 82 if ( !m_contentsDirty|| !m_delegate)82 if (m_dirtyRect.isEmpty() || !m_delegate) 83 83 return; 84 84 … … 120 120 } 121 121 122 m_dirtyRect.setSize(FloatSize()); 123 m_contentsDirty = false; 122 resetNeedsDisplay(); 124 123 125 124 m_provider->putCurrentFrame(frame); -
trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp
r95148 r95365 71 71 return; 72 72 73 if ( !m_contentsDirty)73 if (m_dirtyRect.isEmpty()) 74 74 return; 75 75 … … 85 85 } 86 86 // Update the contents of the texture used by the compositor. 87 if ( m_contentsDirty&& m_textureUpdated) {87 if (!m_dirtyRect.isEmpty() && m_textureUpdated) { 88 88 // prepareTexture copies the contents of the off-screen render target into the texture 89 89 // used by the compositor. … … 91 91 m_context->prepareTexture(); 92 92 m_context->markLayerComposited(); 93 m_contentsDirty = false;93 resetNeedsDisplay(); 94 94 m_textureUpdated = false; 95 95 }
Note: See TracChangeset
for help on using the changeset viewer.