Commit c2414ce7 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Add null check for gl::ProgressReporter

This prevented --enable-features=Metal from working

TBR=zmo

Change-Id: Ief8f46cfe4789942e773dbb250799e5ed5af69cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948915Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721233}
parent d57630a6
...@@ -64,7 +64,7 @@ id<MTLLibrary> API_AVAILABLE(macos(10.11)) ...@@ -64,7 +64,7 @@ id<MTLLibrary> API_AVAILABLE(macos(10.11))
auto state = base::MakeRefCounted<AsyncMetalState>(); auto state = base::MakeRefCounted<AsyncMetalState>();
for (size_t attempt = 0;; ++attempt) { for (size_t attempt = 0;; ++attempt) {
if (base::TimeTicks::Now() - start_time < kTimeout) if (base::TimeTicks::Now() - start_time < kTimeout && progress_reporter)
progress_reporter->ReportProgress(); progress_reporter->ReportProgress();
// The completion handler will signal the condition variable we will wait // The completion handler will signal the condition variable we will wait
...@@ -118,7 +118,7 @@ id<MTLRenderPipelineState> API_AVAILABLE(macos(10.11)) ...@@ -118,7 +118,7 @@ id<MTLRenderPipelineState> API_AVAILABLE(macos(10.11))
const base::TimeTicks start_time = base::TimeTicks::Now(); const base::TimeTicks start_time = base::TimeTicks::Now();
auto state = base::MakeRefCounted<AsyncMetalState>(); auto state = base::MakeRefCounted<AsyncMetalState>();
for (size_t attempt = 0;; ++attempt) { for (size_t attempt = 0;; ++attempt) {
if (base::TimeTicks::Now() - start_time < kTimeout) if (base::TimeTicks::Now() - start_time < kTimeout && progress_reporter)
progress_reporter->ReportProgress(); progress_reporter->ReportProgress();
MTLNewRenderPipelineStateCompletionHandler completionHandler = MTLNewRenderPipelineStateCompletionHandler completionHandler =
^(id<MTLRenderPipelineState> render_pipeline_state, NSError* error) { ^(id<MTLRenderPipelineState> render_pipeline_state, NSError* error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment