Changeset 213783 in webkit
- Timestamp:
- Mar 13, 2017 12:18:33 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r213782 r213783 1 2017-03-13 Jon Lee <jonlee@apple.com> 2 3 WebGPU: Backend - hosting WebGPU layers 4 https://bugs.webkit.org/show_bug.cgi?id=169366 5 <rdar://problem/30928735> 6 7 Reviewed by Dean Jackson. 8 9 * html/canvas/WebGPURenderingContext.cpp: 10 (WebCore::WebGPURenderingContext::create): Create the device and the 11 rendering context. 12 * platform/graphics/cocoa/GPUCommandBufferMetal.mm: 13 (WebCore::GPUCommandBuffer::commit): 14 * platform/graphics/cocoa/GPUDrawableMetal.mm: 15 (WebCore::GPUDrawable::release): Fix a log message 16 * platform/graphics/gpu/GPUCommandBuffer.cpp: 17 (WebCore::GPUCommandBuffer::commit): Deleted. Moved to GPUCommandBufferMetal. 18 * rendering/RenderLayerBacking.cpp: 19 (WebCore::canvasCompositingStrategy): WebGPU canvas should return CanvasAsLayerContents. 20 1 21 2017-03-12 Jon Lee <jonlee@apple.com> 2 22 -
trunk/Source/WebCore/html/canvas/WebGPURenderingContext.cpp
r213762 r213783 72 72 std::unique_ptr<WebGPURenderingContext> WebGPURenderingContext::create(HTMLCanvasElement& canvas) 73 73 { 74 UNUSED_PARAM(canvas); 75 /* FIXME: WebGPU - To be implemented. 76 Document& document = canvas.document(); 77 Frame* frame = document.frame(); 78 if (!frame) 79 return nullptr; 80 81 GPUDevice::Attributes attributes; 82 83 attributes.antialias = false; 84 85 // FIXME: WebGPU - handle retina. 86 // if (page) 87 // attributes.devicePixelRatio = page->deviceScaleFactor(); 88 89 HostWindow* hostWindow = document.view()->root()->hostWindow(); 90 RefPtr<GPUDevice> device(GPUDevice::create(attributes, hostWindow)); 74 RefPtr<GPUDevice> device(GPUDevice::create()); 91 75 92 76 if (!device) { … … 100 84 101 85 return renderingContext; 102 */103 return nullptr;104 86 } 105 87 -
trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandBufferMetal.mm
r213780 r213783 62 62 } 63 63 64 void GPUCommandBuffer::commit() 65 { 66 if (!m_commandBuffer) 67 return; 68 69 [m_commandBuffer commit]; 70 } 71 64 72 } // namespace WebCore 65 73 -
trunk/Source/WebCore/platform/graphics/cocoa/GPUDrawableMetal.mm
r213780 r213783 49 49 void GPUDrawable::release() 50 50 { 51 LOG(WebGPU, " MetalDrawable::release()");51 LOG(WebGPU, "GPUDrawable::release()"); 52 52 m_drawable = nullptr; 53 53 } -
trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp
r213780 r213783 48 48 } 49 49 50 void GPUCommandBuffer::commit()51 {52 }53 54 50 RefPtr<GPURenderCommandEncoder> GPUCommandBuffer::createRenderCommandEncoder(GPURenderPassDescriptor* descriptor) 55 51 { -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r213466 r213783 85 85 return CanvasAsLayerContents; 86 86 87 #if ENABLE(WEBGPU) 88 if (context->isGPU()) 89 return CanvasAsLayerContents; 90 #endif 91 87 92 #if ENABLE(ACCELERATED_2D_CANVAS) 88 93 return CanvasAsLayerContents;
Note: See TracChangeset
for help on using the changeset viewer.