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 
8 #include "SkBitmapProvider.h"
9 #include "SkImage_Base.h"
10 
makeCacheDesc() const11 SkBitmapCacheDesc SkBitmapProvider::makeCacheDesc() const {
12     return SkBitmapCacheDesc::Make(fImage);
13 }
14 
notifyAddedToCache() const15 void SkBitmapProvider::notifyAddedToCache() const {
16     as_IB(fImage)->notifyAddedToRasterCache();
17 }
18 
asBitmap(SkBitmap * bm) const19 bool SkBitmapProvider::asBitmap(SkBitmap* bm) const {
20     return as_IB(fImage)->getROPixels(bm);
21 }
22