'setRenderPipelineState:' is unavailable: not available on iOS
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2018 23:26:21 +0000 (23:26 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2018 23:26:21 +0000 (23:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186449
<rdar://problem/40880602>

Reviewed by Simon Fraser.

Be more explicit about the protocol type to avoid
the compiler getting confused by a similar signature.

* platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm:
(WebCore::GPURenderCommandEncoder::setRenderPipelineState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232649 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm

index fea74db..3213937 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-08  Dean Jackson  <dino@apple.com>
+
+        'setRenderPipelineState:' is unavailable: not available on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=186449
+        <rdar://problem/40880602>
+
+        Reviewed by Simon Fraser.
+
+        Be more explicit about the protocol type to avoid
+        the compiler getting confused by a similar signature.
+
+        * platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm:
+        (WebCore::GPURenderCommandEncoder::setRenderPipelineState):
+
 2018-06-08  Darin Adler  <darin@apple.com>
 
         Fix iOS build.
index ff66058..23cb1aa 100644 (file)
@@ -54,7 +54,9 @@ void GPURenderCommandEncoder::setRenderPipelineState(GPURenderPipelineState* ren
     if (!m_renderCommandEncoder || !renderPipelineState)
         return;
 
-    [m_renderCommandEncoder setRenderPipelineState:static_cast<id<MTLRenderPipelineState>>(renderPipelineState->platformRenderPipelineState())];
+    // We need to cast to MTLRenderCommandEncoder explicitly because the compiler gets
+    // confused by a protocol with a similar signature.
+    [(id<MTLRenderCommandEncoder>)m_renderCommandEncoder.get() setRenderPipelineState:static_cast<id<MTLRenderPipelineState>>(renderPipelineState->platformRenderPipelineState())];
 }
 
 void GPURenderCommandEncoder::setDepthStencilState(GPUDepthStencilState* depthStencilState)