Home
last modified time | relevance | path

Searched refs:SkBitmap (Results 1 – 25 of 186) sorted by relevance

12345678

/external/skia/include/images/
DSkImageDecoder.h116 virtual void inspect(int index, SkBitmap::Config config, int width, int height) {} in inspect()
150 void setPrefConfigTable(const SkBitmap::Config pref[6]);
152 SkBitmap::Allocator* getAllocator() const { return fAllocator; } in getAllocator()
153 SkBitmap::Allocator* setAllocator(SkBitmap::Allocator*);
208 bool decode(SkStream*, SkBitmap* bitmap, SkBitmap::Config pref, Mode);
209 bool decode(SkStream* stream, SkBitmap* bitmap, Mode mode) { in decode()
210 return this->decode(stream, bitmap, SkBitmap::kNo_Config, mode); in decode()
230 virtual bool decodeRegion(SkBitmap* bitmap, SkIRect rect,
231 SkBitmap::Config pref);
251 static bool DecodeFile(const char file[], SkBitmap* bitmap,
[all …]
DSkImageRef.h44 SkImageRef(SkStream*, SkBitmap::Config config, int sampleSize = 1);
58 bool getInfo(SkBitmap* bm);
64 bool isOpaque(SkBitmap* bm);
77 virtual bool onDecode(SkImageDecoder* codec, SkStream*, SkBitmap*,
78 SkBitmap::Config, SkImageDecoder::Mode);
90 SkBitmap fBitmap;
100 SkBitmap::Config fConfig;
/external/skia/src/core/
DSkBitmap.cpp39 struct SkBitmap::MipMap : SkNoncopyable {
84 SkBitmap::SkBitmap() { in SkBitmap() function in SkBitmap
88 SkBitmap::SkBitmap(const SkBitmap& src) { in SkBitmap() function in SkBitmap
95 SkBitmap::~SkBitmap() { in ~SkBitmap()
100 SkBitmap& SkBitmap::operator=(const SkBitmap& src) { in operator =()
131 void SkBitmap::swap(SkBitmap& other) { in swap()
148 void SkBitmap::reset() { in reset()
153 int SkBitmap::ComputeBytesPerPixel(SkBitmap::Config config) { in ComputeBytesPerPixel()
180 int SkBitmap::ComputeRowBytes(Config c, int width) { in ComputeRowBytes()
217 Sk64 SkBitmap::ComputeSize64(Config c, int width, int height) { in ComputeSize64()
[all …]
DSkBitmapProcShader.cpp5 bool SkBitmapProcShader::CanDo(const SkBitmap& bm, TileMode tx, TileMode ty) { in CanDo()
7 case SkBitmap::kA8_Config: in CanDo()
8 case SkBitmap::kRGB_565_Config: in CanDo()
9 case SkBitmap::kIndex8_Config: in CanDo()
10 case SkBitmap::kARGB_8888_Config: in CanDo()
19 SkBitmapProcShader::SkBitmapProcShader(const SkBitmap& src, in SkBitmapProcShader()
47 bool SkBitmapProcShader::asABitmap(SkBitmap* texture, SkMatrix* texM, in asABitmap()
75 bool SkBitmapProcShader::setContext(const SkBitmap& device, in setContext()
94 const SkBitmap& bitmap = *fState.fBitmap; in setContext()
104 case SkBitmap::kRGB_565_Config: in setContext()
[all …]
DSkCoreBlitters.h26 SkRasterBlitter(const SkBitmap& device) : fDevice(device) {} in SkRasterBlitter()
29 const SkBitmap& fDevice;
37 SkShaderBlitter(const SkBitmap& device, const SkPaint& paint);
55 SkA8_Blitter(const SkBitmap& device, const SkPaint& paint);
61 virtual const SkBitmap* justAnOpaqueColor(uint32_t*);
74 SkA8_Shader_Blitter(const SkBitmap& device, const SkPaint& paint);
95 SkARGB32_Blitter(const SkBitmap& device, const SkPaint& paint);
101 virtual const SkBitmap* justAnOpaqueColor(uint32_t*);
117 SkARGB32_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint) in SkARGB32_Opaque_Blitter()
127 SkARGB32_Black_Blitter(const SkBitmap& device, const SkPaint& paint) in SkARGB32_Black_Blitter()
[all …]
/external/skia/src/images/
DSkImageDecoder.cpp38 static SkBitmap::Config gDeviceConfig = SkBitmap::kNo_Config;
40 SkBitmap::Config SkImageDecoder::GetDeviceConfig() in GetDeviceConfig()
45 void SkImageDecoder::SetDeviceConfig(SkBitmap::Config config) in SetDeviceConfig()
54 fSampleSize(1), fDefaultPref(SkBitmap::kNo_Config), fDitherImage(true), in SkImageDecoder()
79 SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator* alloc) { in setAllocator()
96 bool SkImageDecoder::chooseFromOneChoice(SkBitmap::Config config, int width, in chooseFromOneChoice()
108 bool SkImageDecoder::allocPixelRef(SkBitmap* bitmap, in allocPixelRef()
115 void SkImageDecoder::setPrefConfigTable(const SkBitmap::Config pref[6]) { in setPrefConfigTable()
124 SkBitmap::Config SkImageDecoder::getPrefConfig(SrcDepth srcDepth, in getPrefConfig()
126 SkBitmap::Config config; in getPrefConfig()
[all …]
DSkFlipPixelRef.cpp5 SkFlipPixelRef::SkFlipPixelRef(SkBitmap::Config config, int width, int height) in SkFlipPixelRef()
8 fSize = SkBitmap::ComputeSize(config, width, height); in SkFlipPixelRef()
18 const SkRegion& SkFlipPixelRef::beginUpdate(SkBitmap* device) { in beginUpdate()
82 static void copyRect(const SkBitmap& dst, const SkIRect& rect, in copyRect()
98 static int getShift(SkBitmap::Config config) { in getShift()
100 case SkBitmap::kARGB_8888_Config: in getShift()
102 case SkBitmap::kRGB_565_Config: in getShift()
103 case SkBitmap::kARGB_4444_Config: in getShift()
105 case SkBitmap::kIndex8_Config: in getShift()
106 case SkBitmap::kA8_Config: in getShift()
[all …]
DSkImageDecoder_libpng.cpp69 virtual bool onDecodeRegion(SkBitmap* bitmap, SkIRect rect);
70 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
78 SkBitmap::Config *config, bool *hasAlpha, bool *doDither,
140 static bool substituteTranspColor(SkBitmap* bm, SkPMColor match) { in substituteTranspColor()
141 SkASSERT(bm->config() == SkBitmap::kARGB_8888_Config); in substituteTranspColor()
158 static bool canUpscalePaletteToConfig(SkBitmap::Config dstConfig, in canUpscalePaletteToConfig()
161 case SkBitmap::kARGB_8888_Config: in canUpscalePaletteToConfig()
162 case SkBitmap::kARGB_4444_Config: in canUpscalePaletteToConfig()
164 case SkBitmap::kRGB_565_Config: in canUpscalePaletteToConfig()
261 bool SkPNGImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* decodedBitmap, in onDecode()
[all …]
DSkImageDecoder_libjpeg.cpp83 virtual bool onDecodeRegion(SkBitmap* bitmap, SkIRect rect);
84 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
188 const SkBitmap& bm, const char msg[]) { in return_false()
197 bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { in onDecode()
259 SkBitmap::Config config = this->getPrefConfig(k32Bit_SrcDepth, false); in onDecode()
261 if (config != SkBitmap::kARGB_8888_Config && in onDecode()
262 config != SkBitmap::kARGB_4444_Config && in onDecode()
263 config != SkBitmap::kRGB_565_Config) { in onDecode()
264 config = SkBitmap::kARGB_8888_Config; in onDecode()
269 if (config == SkBitmap::kARGB_8888_Config) { in onDecode()
[all …]
DSkCreateRLEPixelRef.cpp8 RLEPixelRef(SkBitmap::RLEPixels* rlep, SkColorTable* ctable);
17 SkBitmap::RLEPixels* fRLEPixels;
21 RLEPixelRef::RLEPixelRef(SkBitmap::RLEPixels* rlep, SkColorTable* ctable) in RLEPixelRef()
44 class ChunkRLEPixels : public SkBitmap::RLEPixels {
47 : SkBitmap::RLEPixels(width, height), fStorage(chunkSize) { in ChunkRLEPixels()
53 SkPixelRef* SkCreateRLEPixelRef(const SkBitmap& src);
54 SkPixelRef* SkCreateRLEPixelRef(const SkBitmap& src) { in SkCreateRLEPixelRef()
56 if (SkBitmap::kIndex8_Config != src.config() && in SkCreateRLEPixelRef()
57 SkBitmap::kA8_Config != src.config()) { in SkCreateRLEPixelRef()
DSkImageDecoder_libico.cpp32 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
53 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors);
56 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors);
59 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors);
62 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors);
65 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors);
81 bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) in onDecode()
117 SkBitmap::Config c; in onDecode()
127 c = SkBitmap::kIndex8_Config; in onDecode()
132 c = SkBitmap::kARGB_8888_Config; in onDecode()
[all …]
/external/skia/src/utils/mac/
DSkCreateCGImageRef.cpp5 extern CGImageRef SkCreateCGImageRef(const SkBitmap&);
8 SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(info); in SkBitmap_ReleaseInfo()
16 static SkBitmap* prepareForImageRef(const SkBitmap& bm, in prepareForImageRef()
22 case SkBitmap::kRGB_565_Config: in prepareForImageRef()
25 case SkBitmap::kARGB_8888_Config: in prepareForImageRef()
39 #warning Cannot convert SkBitmap to CGImageRef with these shiftmasks. \ in prepareForImageRef()
48 case SkBitmap::kRGB_565_Config: in prepareForImageRef()
54 case SkBitmap::kARGB_4444_Config: in prepareForImageRef()
62 SkBitmap* copy; in prepareForImageRef()
64 copy = new SkBitmap; in prepareForImageRef()
[all …]
/external/skia/tests/
DBitmapCopyTest.cpp14 static void report_opaqueness(skiatest::Reporter* reporter, const SkBitmap& src, in report_opaqueness()
15 const SkBitmap& dst) { in report_opaqueness()
23 static bool canHaveAlpha(SkBitmap::Config config) { in canHaveAlpha()
24 return config != SkBitmap::kRGB_565_Config; in canHaveAlpha()
28 static void test_isOpaque(skiatest::Reporter* reporter, const SkBitmap& src, in test_isOpaque()
29 SkBitmap::Config dstConfig) { in test_isOpaque()
30 SkBitmap bitmap(src); in test_isOpaque()
31 SkBitmap dst; in test_isOpaque()
65 static void init_src(const SkBitmap& bitmap) { in init_src()
80 SkBitmap::Config fConfig;
[all …]
DBlitRowTest.cpp60 static Proc find_proc(const SkBitmap& bm, SkPMColor expect32, uint16_t expect16, in find_proc()
63 case SkBitmap::kARGB_8888_Config: in find_proc()
66 case SkBitmap::kARGB_4444_Config: in find_proc()
67 case SkBitmap::kRGB_565_Config: in find_proc()
70 case SkBitmap::kA8_Config: in find_proc()
79 static bool check_color(const SkBitmap& bm, SkPMColor expect32, in check_color()
102 static const SkBitmap::Config gDstConfig[] = { in test_00_FF()
103 SkBitmap::kARGB_8888_Config, in test_00_FF()
104 SkBitmap::kRGB_565_Config, in test_00_FF()
124 SkBitmap srcBM; in test_00_FF()
[all …]
/external/webkit/WebCore/platform/graphics/android/
DImageSourceAndroid.cpp49 SkPixelRef* SkCreateRLEPixelRef(const SkBitmap& src);
65 static const SkBitmap::Config gPrefConfigTable[6] = {
66 SkBitmap::kIndex8_Config, // src: index, opaque
67 SkBitmap::kIndex8_Config, // src: index, alpha
68 SkBitmap::kRGB_565_Config, // src: 16bit, opaque
69 SkBitmap::kARGB_8888_Config, // src: 16bit, alpha (promote to 32bit)
70 SkBitmap::kARGB_8888_Config, // src: 32bit, opaque
71 SkBitmap::kARGB_8888_Config, // src: 32bit, alpha
78 static const SkBitmap::Config gPrefConfigTable[6] = {
79 SkBitmap::kIndex8_Config, // src: index, opaque
[all …]
/external/skia/bench/
DBitmapBench.cpp17 static void drawIntoBitmap(const SkBitmap& bm) { in drawIntoBitmap()
52 static void convertToIndex666(const SkBitmap& src, SkBitmap* dst) { in convertToIndex666()
67 dst->setConfig(SkBitmap::kIndex8_Config, src.width(), src.height()); in convertToIndex666()
93 SkBitmap fBitmap;
100 BitmapBench(void* param, bool isOpaque, SkBitmap::Config c, in BitmapBench()
105 SkBitmap bm; in BitmapBench()
107 if (SkBitmap::kIndex8_Config == c) { in BitmapBench()
108 bm.setConfig(SkBitmap::kARGB_8888_Config, w, h); in BitmapBench()
117 if (SkBitmap::kIndex8_Config == c) { in BitmapBench()
150 const SkBitmap& bitmap = fBitmap; in onDraw()
[all …]
DRepeatTileBench.cpp13 static void drawIntoBitmap(const SkBitmap& bm) { in drawIntoBitmap()
48 static void convertToIndex666(const SkBitmap& src, SkBitmap* dst) { in convertToIndex666()
63 dst->setConfig(SkBitmap::kIndex8_Config, src.width(), src.height()); in convertToIndex666()
84 RepeatTileBench(void* param, SkBitmap::Config c) : INHERITED(param) { in RepeatTileBench()
87 SkBitmap bm; in RepeatTileBench()
89 if (SkBitmap::kIndex8_Config == c) { in RepeatTileBench()
90 bm.setConfig(SkBitmap::kARGB_8888_Config, w, h); in RepeatTileBench()
99 if (SkBitmap::kIndex8_Config == c) { in RepeatTileBench()
100 SkBitmap tmp; in RepeatTileBench()
130 static SkBenchmark* Fact0(void* p) { return new RepeatTileBench(p, SkBitmap::kARGB_8888_Config); } in Fact0()
[all …]
Dbenchmain.cpp25 static void erase(SkBitmap& bm) { in erase()
26 if (bm.config() == SkBitmap::kA8_Config) { in erase()
33 static bool equal(const SkBitmap& bm1, const SkBitmap& bm2) { in equal()
88 const SkBitmap& bm) { in saveFile()
89 SkBitmap copy; in saveFile()
90 if (!bm.copyTo(&copy, SkBitmap::kARGB_8888_Config)) { in saveFile()
94 if (bm.config() == SkBitmap::kA8_Config) { in saveFile()
146 static void compare_pict_to_bitmap(SkPicture* pict, const SkBitmap& bm) { in compare_pict_to_bitmap()
147 SkBitmap bm2; in compare_pict_to_bitmap()
170 SkBitmap::Config fConfig;
[all …]
DFPSBench.cpp52 Bitmap_FPSBench(void* p, SkBitmap::Config config, bool doOpaque, bool doScale) : INHERITED(p) { in Bitmap_FPSBench()
61 if (config == SkBitmap::kARGB_8888_Config) { in Bitmap_FPSBench()
84 SkBitmap fBitmap;
93 static SkBenchmark* BMFactory0(void* p) { return SkNEW_ARGS(Bitmap_FPSBench, (p, SkBitmap::kARGB_88… in BMFactory0()
94 static SkBenchmark* BMFactory1(void* p) { return SkNEW_ARGS(Bitmap_FPSBench, (p, SkBitmap::kARGB_88… in BMFactory1()
95 static SkBenchmark* BMFactory2(void* p) { return SkNEW_ARGS(Bitmap_FPSBench, (p, SkBitmap::kARGB_88… in BMFactory2()
96 static SkBenchmark* BMFactory3(void* p) { return SkNEW_ARGS(Bitmap_FPSBench, (p, SkBitmap::kARGB_88… in BMFactory3()
97 static SkBenchmark* BMFactory4(void* p) { return SkNEW_ARGS(Bitmap_FPSBench, (p, SkBitmap::kRGB_565… in BMFactory4()
98 static SkBenchmark* BMFactory5(void* p) { return SkNEW_ARGS(Bitmap_FPSBench, (p, SkBitmap::kRGB_565… in BMFactory5()
/external/skia/include/core/
DSkBitmap.h40 class SkBitmap {
60 SkBitmap();
64 SkBitmap(const SkBitmap& src);
67 ~SkBitmap();
72 SkBitmap& operator=(const SkBitmap& src);
76 void swap(SkBitmap& other);
368 bool extractSubset(SkBitmap* dst, const SkIRect& subset) const;
381 bool copyTo(SkBitmap* dst, Config c, Allocator* allocator = NULL) const;
396 int extractMipLevel(SkBitmap* dst, SkFixed sx, SkFixed sy);
398 void extractAlpha(SkBitmap* dst) const { in extractAlpha()
[all …]
/external/skia/gm/
Dgmmain.cpp60 static void force_all_opaque(const SkBitmap& bitmap) { in force_all_opaque()
69 static bool write_bitmap(const SkString& path, const SkBitmap& bitmap) { in write_bitmap()
70 SkBitmap copy; in write_bitmap()
71 bitmap.copyTo(&copy, SkBitmap::kARGB_8888_Config); in write_bitmap()
77 static void compare(const SkBitmap& target, const SkBitmap& base, in compare()
79 SkBitmap copy; in compare()
80 const SkBitmap* bm = &target; in compare()
81 if (target.config() != SkBitmap::kARGB_8888_Config) { in compare()
82 target.copyTo(&copy, SkBitmap::kARGB_8888_Config); in compare()
113 SkBitmap::Config fConfig;
[all …]
Dbitmapfilters.cpp5 static void make_bm(SkBitmap* bm) { in make_bm()
11 bm->setConfig(SkBitmap::kIndex8_Config, 2, 2); in make_bm()
21 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, in draw_bm()
27 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, in draw_set()
46 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) { in draw_row()
70 SkBitmap fBM8, fBM4444, fBM16, fBM32;
74 fBM8.copyTo(&fBM4444, SkBitmap::kARGB_4444_Config); in FilterGM()
75 fBM8.copyTo(&fBM16, SkBitmap::kRGB_565_Config); in FilterGM()
76 fBM8.copyTo(&fBM32, SkBitmap::kARGB_8888_Config); in FilterGM()
/external/skia/src/effects/
DSkTransparentShader.cpp21 bool SkTransparentShader::setContext(const SkBitmap& device, in setContext()
36 case SkBitmap::kRGB_565_Config: in getFlags()
41 case SkBitmap::kARGB_8888_Config: in getFlags()
42 case SkBitmap::kARGB_4444_Config: in getFlags()
57 case SkBitmap::kARGB_8888_Config: in shadeSpan()
67 case SkBitmap::kRGB_565_Config: in shadeSpan()
93 case SkBitmap::kARGB_4444_Config: in shadeSpan()
112 case SkBitmap::kIndex8_Config: in shadeSpan()
115 case SkBitmap::kA8_Config: in shadeSpan()
130 case SkBitmap::kA1_Config: in shadeSpan()
[all …]
/external/webkit/WebKit/android/plugins/
DSkANP.cpp60 SkBitmap* SkANP::SetBitmap(SkBitmap* dst, const ANPBitmap& src) { in SetBitmap()
61 SkBitmap::Config config = SkBitmap::kNo_Config; in SetBitmap()
65 config = SkBitmap::kARGB_8888_Config; in SetBitmap()
68 config = SkBitmap::kRGB_565_Config; in SetBitmap()
79 bool SkANP::SetBitmap(ANPBitmap* dst, const SkBitmap& src) { in SetBitmap()
86 case SkBitmap::kARGB_8888_Config: in SetBitmap()
89 case SkBitmap::kRGB_565_Config: in SetBitmap()
/external/skia/src/gl/
DSkGL.cpp139 static bool canBeTexture(const SkBitmap& bm, GLenum* format, GLenum* type) { in canBeTexture()
141 case SkBitmap::kARGB_8888_Config: in canBeTexture()
145 case SkBitmap::kRGB_565_Config: in canBeTexture()
149 case SkBitmap::kARGB_4444_Config: in canBeTexture()
153 case SkBitmap::kIndex8_Config: in canBeTexture()
163 case SkBitmap::kA8_Config: in canBeTexture()
175 size_t SkGL::ComputeTextureMemorySize(const SkBitmap& bitmap) { in ComputeTextureMemorySize()
179 case SkBitmap::kARGB_8888_Config: in ComputeTextureMemorySize()
180 case SkBitmap::kRGB_565_Config: in ComputeTextureMemorySize()
181 case SkBitmap::kARGB_4444_Config: in ComputeTextureMemorySize()
[all …]

12345678