Skip to content

Commit

Permalink
ref
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin committed Sep 6, 2024
1 parent 2fae00a commit b1d9eec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public class SentryReplayOptions: NSObject, SentryRedactOptions {
* A list of custom UIView subclasses to be ignored
* during masking step of the session replay.
* The view itself and any child will be ignored and not masked.
* This property has precedence over `redactViewTypes`.
*/
public var ignoreRedactViewTypes = [AnyClass]()

Expand Down
4 changes: 3 additions & 1 deletion Sources/Swift/Tools/SentryViewPhotographer.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#if canImport(UIKit) && !SENTRY_NO_UIKIT
#if os(iOS) || os(tvOS)

@_implementationOnly import _SentryPrivate
import CoreGraphics
import Foundation
import UIKit
Expand All @@ -22,6 +23,7 @@ class DefaultViewRenderer: ViewRenderer {
class SentryViewPhotographer: NSObject, SentryViewScreenshotProvider {
static let shared = SentryViewPhotographer()
private let redactBuilder = UIRedactBuilder()
private let dispatchQueue = SentryDispatchQueueWrapper()

var renderer: ViewRenderer

Expand All @@ -39,7 +41,7 @@ class SentryViewPhotographer: NSObject, SentryViewScreenshotProvider {

let redact = redactBuilder.redactRegionsFor(view: view, options: options)
let imageSize = view.bounds.size
DispatchQueue.global().async {
dispatchQueue.dispatchAsync {
let screenshot = UIGraphicsImageRenderer(size: imageSize, format: .init(for: .init(displayScale: 1))).image { context in

context.cgContext.addRect(CGRect(origin: CGPoint.zero, size: imageSize))
Expand Down

0 comments on commit b1d9eec

Please sign in to comment.