| Index: src/codec/SkSampler.h
|
| diff --git a/src/codec/SkSampler.h b/src/codec/SkSampler.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d7b4c98f235ad1ccb15afa7ff77997aa6d621372
|
| --- /dev/null
|
| +++ b/src/codec/SkSampler.h
|
| @@ -0,0 +1,27 @@
|
| +/*
|
| + * Copyright 2015 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +#ifndef SkSampler_DEFINED
|
| +#define SkSampler_DEFINED
|
| +
|
| +#include "SkTypes.h"
|
| +
|
| +class SkSampler : public SkNoncopyable {
|
| +public:
|
| + /**
|
| + * Update the sampler to sample every sampleX'th pixel. Returns the
|
| + * width after sampling.
|
| + */
|
| + int setSampleX(int sampleX) {
|
| + return this->onSetSampleX(sampleX);
|
| + }
|
| +
|
| + virtual ~SkSampler() {}
|
| +private:
|
| + virtual int onSetSampleX(int) = 0;
|
| +};
|
| +
|
| +#endif // SkSampler_DEFINED
|
|
|