Pass active GrContext to ApplyImageFilter

Note: this is only a partial fix for the problem (detailed below). A more complete fix will require a more disciplined approach.

Mainline Chrome only has one type of GrContext to worry about so it can pass it around willy-nilly. In Viz's world, however, there are two types of GrContext - a RecordingContext (that a DDLRecorder gets) and a DirectContext (that can also record but has full access to the GPU).

The crash in this case resulted from crossing over between the two types of GrContext. Both contexts are recording ops, the assert that fired is, basically, checking that ops destined for one type of context aren't being fed to another.

We are making structural changes within Skia that should make all these distinctions clearer and less error prone.

Bug: 919885
Change-Id: I9c0ffb4c10cfdbbfe92d51bc70d75d6dc29b18c4
Reviewed-by: Peng Huang <>
Commit-Queue: Robert Phillips <>
Cr-Commit-Position: refs/heads/master@{#623795}
4 files changed