Chromium Code Reviews| Index: content/browser/renderer_host/compositing_iosurface_layer_mac.mm |
| diff --git a/content/browser/renderer_host/compositing_iosurface_layer_mac.mm b/content/browser/renderer_host/compositing_iosurface_layer_mac.mm |
| index 38054c855a5e65c68c07f4406ef71c7df0da6f39..81a3529f0b56c45374e82cf450818ca8d377929f 100644 |
| --- a/content/browser/renderer_host/compositing_iosurface_layer_mac.mm |
| +++ b/content/browser/renderer_host/compositing_iosurface_layer_mac.mm |
| @@ -102,7 +102,10 @@ void CompositingIOSurfaceLayerHelper::AckPendingFrame(bool success) { |
| if (!has_pending_frame_) |
| return; |
| has_pending_frame_ = false; |
| - client_->AcceleratedLayerDidDrawFrame(success); |
| + if (success) |
| + client_->AcceleratedLayerDidDrawFrame(); |
| + else |
| + client_->AcceleratedLayerHitError(); |
| // A trace value of 0 indicates that there is no longer a pending swap ack. |
| TRACE_COUNTER_ID1("browser", "PendingSwapAck", this, 0); |
| } |
| @@ -174,13 +177,19 @@ void CompositingIOSurfaceLayerHelper::EndPumpingFrames() { |
| iosurface |
| withScaleFactor:(float)scale_factor |
| withClient:(content::CompositingIOSurfaceLayerClient*)client { |
| + DCHECK(iosurface); |
| if (self = [super init]) { |
| helper_.reset(new content::CompositingIOSurfaceLayerHelper(client, self)); |
| iosurface_ = iosurface; |
| context_ = content::CompositingIOSurfaceContext::Get( |
| content::CompositingIOSurfaceContext::kCALayerContextWindowNumber); |
| - DCHECK(context_); |
| + if (!context_) { |
| + LOG(ERROR) << "Failed create CompositingIOSurfaceContext"; |
|
Ken Russell (switch to Gerrit)
2014/08/07 22:11:44
I wonder whether here and throughout these classes
ccameron
2014/08/07 22:28:24
If anything, I'd like to make these errors more vi
|
| + [self resetClient]; |
| + [self release]; |
| + return nil; |
| + } |
| [self setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)]; |
| [self setAnchorPoint:CGPointMake(0, 0)]; |