blob: c54851405754a101eac0bf5e17120fee2d0977a2 [file] [log] [blame]
Leon Scroggins IIId81fed92017-06-01 13:42:28 -04001/*
2 * Copyright 2017 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#include "SkBmpBaseCodec.h"
8#include "../private/SkMalloc.h"
9
10SkBmpBaseCodec::~SkBmpBaseCodec() {}
11
Mike Reedede7bac2017-07-23 15:30:02 -040012SkBmpBaseCodec::SkBmpBaseCodec(int width, int height, const SkEncodedInfo& info,
13 std::unique_ptr<SkStream> stream,
Leon Scroggins IIId81fed92017-06-01 13:42:28 -040014 uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder)
Mike Reedede7bac2017-07-23 15:30:02 -040015 : INHERITED(width, height, info, std::move(stream), bitsPerPixel, rowOrder)
Mike Reed8dc8dbc2018-01-05 11:20:10 -050016 , fSrcBuffer(sk_malloc_canfail(this->srcRowBytes()))
Leon Scroggins IIId81fed92017-06-01 13:42:28 -040017{}