blob: 2b0ed1f5c32299c65715618ba8e10a6900d8e66d [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
Leon Scroggins III36f7e322018-08-27 11:55:46 -040012SkBmpBaseCodec::SkBmpBaseCodec(SkEncodedInfo&& info, std::unique_ptr<SkStream> stream,
Leon Scroggins IIId81fed92017-06-01 13:42:28 -040013 uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder)
Leon Scroggins III36f7e322018-08-27 11:55:46 -040014 : INHERITED(std::move(info), std::move(stream), bitsPerPixel, rowOrder)
Mike Reed8dc8dbc2018-01-05 11:20:10 -050015 , fSrcBuffer(sk_malloc_canfail(this->srcRowBytes()))
Leon Scroggins IIId81fed92017-06-01 13:42:28 -040016{}