Home | History | Annotate | Download | only in image

Lines Matching refs:info

39 bool SkSurface_Raster::Valid(const SkImageInfo& info, size_t rowBytes) {
42 SkBitmap::Config config = SkImageInfoToBitmapConfig(info);
65 uint64_t minRB = (uint64_t)info.fWidth << shift;
75 uint64_t size = (uint64_t)info.fHeight * rowBytes;
83 SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, void* pixels, size_t rb)
84 : INHERITED(info.fWidth, info.fHeight) {
85 SkBitmap::Config config = SkImageInfoToBitmapConfig(info);
86 fBitmap.setConfig(config, info.fWidth, info.fHeight, rb, info.fAlphaType);
91 SkSurface_Raster::SkSurface_Raster(const SkImageInfo& info, SkPixelRef* pr, size_t rb)
92 : INHERITED(info.fWidth, info.fHeight) {
93 SkBitmap::Config config = SkImageInfoToBitmapConfig(info);
94 fBitmap.setConfig(config, info.fWidth, info.fHeight, rb, info.fAlphaType);
98 if (!SkAlphaTypeIsOpaque(info.fAlphaType)) {
107 SkSurface* SkSurface_Raster::onNewSurface(const SkImageInfo& info) {
108 return SkSurface::NewRaster(info);
142 SkSurface* SkSurface::NewRasterDirect(const SkImageInfo& info, void* pixels, size_t rowBytes) {
143 if (!SkSurface_Raster::Valid(info, rowBytes)) {
150 return SkNEW_ARGS(SkSurface_Raster, (info, pixels, rowBytes));
153 SkSurface* SkSurface::NewRaster(const SkImageInfo& info) {
154 if (!SkSurface_Raster::Valid(info)) {
158 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, NULL));
162 return SkNEW_ARGS(SkSurface_Raster, (info, pr, info.minRowBytes()));