1 /*
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 
~SkBmpBaseCodec()10 SkBmpBaseCodec::~SkBmpBaseCodec() {}
11 
SkBmpBaseCodec(int width,int height,const SkEncodedInfo & info,std::unique_ptr<SkStream> stream,uint16_t bitsPerPixel,SkCodec::SkScanlineOrder rowOrder)12 SkBmpBaseCodec::SkBmpBaseCodec(int width, int height, const SkEncodedInfo& info,
13                                std::unique_ptr<SkStream> stream,
14                                uint16_t bitsPerPixel, SkCodec::SkScanlineOrder rowOrder)
15     : INHERITED(width, height, info, std::move(stream), bitsPerPixel, rowOrder)
16     , fSrcBuffer(sk_malloc_canfail(this->srcRowBytes()))
17 {}
18