Skip to content

Commit

Permalink
fix cast
Browse files Browse the repository at this point in the history
Diffs=
562fc5c51 fix cast (#6599)

Co-authored-by: hernan <[email protected]>
  • Loading branch information
bodymovin and bodymovin committed Feb 13, 2024
1 parent 4870298 commit 5c727ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e145f9348ceb3a5cd56cd1005a0fda5f0a3e754e
562fc5c51f6ea36b510c8403418e80569079a042
8 changes: 4 additions & 4 deletions viewer/src/skia/viewer_skia_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {
// with Metal and Skia drawing with Metal. I couldn't find a good way to let
// them share a command queue, so drawing to two separate Metal Layers is
// the next best thing.
id<MTLDevice> device = (id<MTLDevice>)sg_mtl_device();
id<MTLDevice> device = (__bridge id<MTLDevice>)sg_mtl_device();
commandQueue = [device newCommandQueue];

NSWindow* window = (NSWindow*)sapp_macos_get_window();
NSWindow* window = (__bridge NSWindow*)sapp_macos_get_window();

// Add a new metal view to our window.
skiaView = [[MTKView alloc] init];
Expand All @@ -63,7 +63,7 @@ typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {
// content.
sokolView.layer.opaque = false;

return GrDirectContext::MakeMetal(device, commandQueue);
return GrDirectContext::MakeMetal((__bridge void*)device, (__bridge void*)commandQueue);
}

sk_sp<SkSurface> makeSkiaSurface(GrDirectContext* context, int width, int height)
Expand All @@ -73,7 +73,7 @@ typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {

drawable = [layer nextDrawable];
GrMtlTextureInfo fbInfo;
fbInfo.fTexture.retain((const void*)(drawable.texture));
fbInfo.fTexture.retain((__bridge const void*)(drawable.texture));
GrBackendRenderTarget renderTarget =
GrBackendRenderTarget(width, height, 1 /* sample count/MSAA */, fbInfo);

Expand Down

0 comments on commit 5c727ff

Please sign in to comment.