Returns the recording context being used by the Surface. @return the recording context, if available; null otherwise
()
| 640 | * @return the recording context, if available; null otherwise |
| 641 | */ |
| 642 | @Nullable |
| 643 | public DirectContext getRecordingContext() { |
| 644 | try { |
| 645 | Stats.onNativeCall(); |
| 646 | long ptr = _nGetRecordingContext(_ptr); |
| 647 | return ptr == 0 ? null : new DirectContext(ptr); |
| 648 | } finally { |
| 649 | ReferenceUtil.reachabilityFence(this); |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | /** |
| 654 | * <p>Returns Canvas that draws into Surface.</p> |