429 void SkiaPipeline::renderFrame( const LayerUpdateQueue& layers, const SkRect& clip, 430 const std::vector<sp<RenderNode>>& nodes, bool opaque, 431 const Rect& contentDrawBounds, sk_sp<SkSurface> surface, 432 const SkMatrix& preTransform) { 433 bool previousSkpEnabled = Properties::skpCaptureEnabled; 434 if (mPictureCapturedCallback) { 435 Properties::skpCaptureEnabled = true ; 436 } 437 438 // Initialize the canvas for the current frame, that might be a recording canvas if SKP 439 // capture is enabled. 440 SkCanvas* canvas = tryCapture(surface.get(), nodes[ 0 ].get(), layers); 441 442 // draw all layers up front 443 renderLayersImpl(layers, opaque); 444 445 renderFrameImpl(clip, nodes, opaque, contentDrawBounds, canvas, preTransform); 446 447 endCapture(surface.get()); 448 449 if (CC_UNLIKELY(Properties::debugOverdraw)) { 450 renderOverdraw(clip, nodes, contentDrawBounds, surface, preTransform); 451 } 452 453 ATRACE_NAME( "flush commands" ); 454 surface->getCanvas()->flush(); 455 456 Properties::skpCaptureEnabled = previousSkpEnabled; 457 } |