summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics/AutoDecodeCancel.h
blob: 37b86f92f990f59e32e24b57479de54e2e9c2b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef AutoDecodeCancel_DEFINED
#define AutoDecodeCancel_DEFINED

#include <jni.h>
#include "SkImageDecoder.h"

class AutoDecoderCancel {
public:
    AutoDecoderCancel(jobject options, SkImageDecoder* decoder);
    ~AutoDecoderCancel();

    static bool RequestCancel(jobject options);

private:
    AutoDecoderCancel*  fNext;
    AutoDecoderCancel*  fPrev;
    jobject             fJOptions;  // java options object
    SkImageDecoder*     fDecoder;

#ifdef SK_DEBUG
    static void Validate();
#else
    static void Validate() {}
#endif
};

#endif