Flutter Engine
The Flutter Engine
SkAndroidCodecAdapter.h
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#ifndef SkAndroidCodecAdapter_DEFINED
8#define SkAndroidCodecAdapter_DEFINED
9
12#include "include/core/SkSize.h"
13
14#include <cstddef>
15
16struct SkIRect;
17struct SkImageInfo;
18
19/**
20 * This class wraps SkCodec to implement the functionality of SkAndroidCodec.
21 * The underlying SkCodec implements sampled decodes. SkCodec's that do not
22 * implement that are wrapped with SkSampledCodec instead.
23 */
25public:
26
28
30
31protected:
32
33 SkISize onGetSampledDimensions(int sampleSize) const override;
34
35 bool onGetSupportedSubset(SkIRect* desiredSubset) const override;
36
37 SkCodec::Result onGetAndroidPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
38 const AndroidOptions& options) override;
39
40private:
41
42 using INHERITED = SkAndroidCodec;
43};
44#endif // SkAndroidCodecAdapter_DEFINED
const char * options
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
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
SkAndroidCodec(SkCodec *)
Result
Definition: SkCodec.h:76
Definition: SkRect.h:32
Definition: SkSize.h:16