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