Changeset 87987 in webkit
- Timestamp:
- Jun 2, 2011 7:10:44 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87981 r87987 1 2011-06-02 John Bates <jbates@google.com> 2 3 Reviewed by James Robinson. 4 5 DrawingBufferChromium cleanup: 6 - Correct FIXME comment about synchronization. 7 - Remove unnecessary DrawingBufferInternal indirection struct 8 and its unused offscreenColorTexture member. 9 https://bugs.webkit.org/show_bug.cgi?id=61953 10 11 * platform/graphics/chromium/DrawingBufferChromium.cpp: 12 (WebCore::DrawingBuffer::DrawingBuffer): 13 (WebCore::DrawingBuffer::~DrawingBuffer): 14 (WebCore::DrawingBuffer::publishToPlatformLayer): 15 (WebCore::DrawingBuffer::didReset): 16 (WebCore::DrawingBuffer::platformLayer): 17 * platform/graphics/gpu/DrawingBuffer.h: 18 1 19 2011-06-02 Andrey Kosyakov <caseq@chromium.org> 2 20 -
trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
r87718 r87987 47 47 namespace WebCore { 48 48 49 struct DrawingBufferInternal {50 unsigned offscreenColorTexture;51 #if USE(ACCELERATED_COMPOSITING)52 RefPtr<Canvas2DLayerChromium> platformLayer;53 #endif54 };55 56 49 static unsigned generateColorTexture(GraphicsContext3D* context, const IntSize& size) 57 50 { … … 87 80 , m_multisampleFBO(0) 88 81 , m_multisampleColorBuffer(0) 89 , m_internal(adoptPtr(new DrawingBufferInternal))90 82 #if USE(SKIA) 91 83 , m_grContext(0) … … 109 101 { 110 102 #if USE(ACCELERATED_COMPOSITING) 111 if (m_ internal->platformLayer)112 m_ internal->platformLayer->setDrawingBuffer(0);103 if (m_platformLayer) 104 m_platformLayer->setDrawingBuffer(0); 113 105 #endif 114 106 … … 129 121 if (multisample()) 130 122 commit(); 131 unsigned parentTexture = m_internal->platformLayer->textureId(); 132 // FIXME: We do the copy in the canvas' (child) context so that it executes in the correct order relative to 133 // other commands in the child context. This ensures that the parent texture always contains a complete 134 // frame and not some intermediate result. However, there is no synchronization to ensure that this copy 135 // happens before the compositor draws. This means we might draw stale frames sometimes. Ideally this 136 // would insert a fence into the child command stream that the compositor could wait for. 123 unsigned parentTexture = m_platformLayer->textureId(); 124 // We do the copy in the canvas' (child) context so that it executes in the correct order relative to 125 // other commands in the child context. This ensures that the parent texture always contains a complete 126 // frame and not some intermediate result. LayerRendererChromium uses glSetLatch to make sure the child 127 // context completes before the parent context consumes the texture. 137 128 m_context->makeContextCurrent(); 138 129 #if USE(SKIA) … … 148 139 { 149 140 #if USE(ACCELERATED_COMPOSITING) 150 if (m_ internal->platformLayer)151 m_ internal->platformLayer->setTextureChanged();141 if (m_platformLayer) 142 m_platformLayer->setTextureChanged(); 152 143 #endif 153 144 } … … 156 147 PlatformLayer* DrawingBuffer::platformLayer() 157 148 { 158 if (!m_ internal->platformLayer)159 m_ internal->platformLayer = Canvas2DLayerChromium::create(this, 0);160 return m_ internal->platformLayer.get();149 if (!m_platformLayer) 150 m_platformLayer = Canvas2DLayerChromium::create(this, 0); 151 return m_platformLayer.get(); 161 152 } 162 153 #endif -
trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.h
r85017 r87987 50 50 namespace WebCore { 51 51 52 #if PLATFORM(CHROMIUM) 53 struct DrawingBufferInternal;52 #if PLATFORM(CHROMIUM) && USE(ACCELERATED_COMPOSITING) 53 class Canvas2DLayerChromium; 54 54 #endif 55 55 … … 139 139 #if PLATFORM(CHROMIUM) 140 140 OwnPtr<WillPublishCallback> m_callback; 141 OwnPtr<DrawingBufferInternal> m_internal; 141 #if USE(ACCELERATED_COMPOSITING) 142 RefPtr<Canvas2DLayerChromium> m_platformLayer; 143 #endif 142 144 #endif 143 145
Note: See TracChangeset
for help on using the changeset viewer.