1 #ifndef AutoDecodeCancel_DEFINED 2 #define AutoDecodeCancel_DEFINED 3 4 #include <jni.h> 5 #include "SkImageDecoder.h" 6 7 class AutoDecoderCancel { 8 public: 9 AutoDecoderCancel(jobject options, SkImageDecoder* decoder); 10 ~AutoDecoderCancel(); 11 12 static bool RequestCancel(jobject options); 13 14 private: 15 AutoDecoderCancel* fNext; 16 AutoDecoderCancel* fPrev; 17 jobject fJOptions; // java options object 18 SkImageDecoder* fDecoder; 19 20 #ifdef SK_DEBUG 21 static void Validate(); 22 #else Validate()23 static void Validate() {} 24 #endif 25 }; 26 27 #endif 28