Flutter Engine
The Flutter Engine
SkAndroidCodecAdapter.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
10
11struct SkIRect;
12struct SkImageInfo;
13
15 : INHERITED(codec)
16{}
17
19 float scale = get_scale_from_sample_size(sampleSize);
20 return this->codec()->getScaledDimensions(scale);
21}
22
24 return this->codec()->getValidSubset(desiredSubset);
25}
26
28 size_t rowBytes, const AndroidOptions& options) {
29 return this->codec()->getPixels(info, pixels, rowBytes, &options);
30}
const char * options
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
static float get_scale_from_sample_size(int sampleSize)
Definition: SkCodecPriv.h:31
SkCodec::Result onGetAndroidPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, const AndroidOptions &options) override
SkISize onGetSampledDimensions(int sampleSize) const override
bool onGetSupportedSubset(SkIRect *desiredSubset) const override
SkCodec * codec() const
bool getValidSubset(SkIRect *desiredSubset) const
Definition: SkCodec.h:285
Result getPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, const Options *)
Definition: SkCodec.cpp:467
Result
Definition: SkCodec.h:76
SkISize getScaledDimensions(float desiredScale) const
Definition: SkCodec.h:255
const Scalar scale
Definition: SkRect.h:32
Definition: SkSize.h:16