| Index: src/codec/SkAndroidRawCodec.cpp
|
| diff --git a/src/codec/SkAndroidRawCodec.cpp b/src/codec/SkAndroidRawCodec.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bc627be3ba05b0e335ae052fa4e58c98f8f431e2
|
| --- /dev/null
|
| +++ b/src/codec/SkAndroidRawCodec.cpp
|
| @@ -0,0 +1,30 @@
|
| +/*
|
| + * Copyright 2015 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#include "SkCodec.h"
|
| +#include "SkCodecPriv.h"
|
| +#include "SkAndroidRawCodec.h"
|
| +
|
| +SkAndroidRawCodec::SkAndroidRawCodec(SkRawCodec* codec)
|
| + : INHERITED(codec)
|
| +{}
|
| +
|
| +SkISize SkAndroidRawCodec::onGetSampledDimensions(int sampleSize) const {
|
| + // No scaling yet available.
|
| + return this->codec()->getInfo().dimensions();
|
| +}
|
| +
|
| +SkCodec::Result SkAndroidRawCodec::onGetAndroidPixels(
|
| + const SkImageInfo& info, void* pixels, size_t rowBytes,
|
| + const AndroidOptions& options) {
|
| + SkCodec::Options codecOptions;
|
| + codecOptions.fZeroInitialized = options.fZeroInitialized;
|
| + codecOptions.fSubset = options.fSubset;
|
| + return this->codec()->getPixels(
|
| + info, pixels, rowBytes, &codecOptions, options.fColorPtr,
|
| + options.fColorCount);
|
| +}
|
|
|