Home
last modified time | relevance | path

Searched refs:Bitmap (Results 1 – 25 of 276) sorted by relevance

12345678910>>...12

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowBitmapTest.java8 import android.graphics.Bitmap;
33 Bitmap originalBitmap = create("Original bitmap"); in shouldCreateScaledBitmap()
34 Bitmap scaledBitmap = Bitmap.createScaledBitmap(originalBitmap, 100, 200, false); in shouldCreateScaledBitmap()
44 Bitmap bitmap = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in shouldCreateActiveBitmap()
49 assertThat(bitmap.getConfig()).isEqualTo(Bitmap.Config.ARGB_8888); in shouldCreateActiveBitmap()
54 Bitmap bitmap = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in hasAlpha()
63 Bitmap bitmap = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in hasMipmap()
72 Bitmap bitmap = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in getAllocationByteCount()
82 Bitmap bitmap = Bitmap.createBitmap(colors, 3, 2, Bitmap.Config.ARGB_8888); in shouldCreateBitmapWithColors()
85 assertThat(bitmap.getConfig()).isEqualTo(Bitmap.Config.ARGB_8888); in shouldCreateBitmapWithColors()
[all …]
DShadowBitmapFactoryTest.java9 import android.graphics.Bitmap;
37 Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.an_image); in decodeResource_shouldSetDescriptionAndCreatedFrom()
47 Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.an_image); in decodeResource_shouldSetDefaultBitmapConfig()
48 assertThat(bitmap.getConfig()).isEqualTo(Bitmap.Config.ARGB_8888); in decodeResource_shouldSetDefaultBitmapConfig()
60 options.inPreferredConfig = Bitmap.Config.ALPHA_8; in decodeResource_shouldPassABitmapConfig()
61 Bitmap bitmap = in decodeResource_shouldPassABitmapConfig()
63 assertThat(bitmap.getConfig()).isEqualTo(Bitmap.Config.ALPHA_8); in decodeResource_shouldPassABitmapConfig()
68 Bitmap bitmap = BitmapFactory.decodeFile("/some/file.jpg"); in decodeFile_shouldSetDescriptionAndCreatedFrom()
80 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in decodeStream_shouldSetDescriptionAndCreatedFrom()
92 Bitmap bitmap = BitmapFactory.decodeByteArray(yummyBites, 100, 100); in decodeBytes_shouldSetDescriptionAndCreatedFrom()
[all …]
/external/tensorflow/tensorflow/core/lib/core/
Dbitmap.h25 class Bitmap {
28 Bitmap();
31 explicit Bitmap(size_t n);
33 ~Bitmap();
35 Bitmap(const Bitmap&) = delete;
36 Bitmap& operator=(const Bitmap&) = delete;
80 inline Bitmap::Bitmap() : nbits_(0), word_(nullptr) {} in Bitmap() function
82 inline Bitmap::Bitmap(size_t n) : Bitmap() { Reset(n); } in Bitmap() function
84 inline Bitmap::~Bitmap() { delete[] word_; } in ~Bitmap()
86 inline size_t Bitmap::bits() const { return nbits_; } in bits()
[all …]
/external/v8/src/heap/
Dmarking.cc10 void Bitmap::Clear() { in Clear()
20 void Bitmap::MarkAllBits() { in MarkAllBits()
30 void Bitmap::SetRange(uint32_t start_index, uint32_t end_index) { in SetRange()
31 unsigned int start_cell_index = start_index >> Bitmap::kBitsPerCellLog2; in SetRange()
32 MarkBit::CellType start_index_mask = 1u << Bitmap::IndexInCell(start_index); in SetRange()
33 unsigned int end_cell_index = end_index >> Bitmap::kBitsPerCellLog2; in SetRange()
34 MarkBit::CellType end_index_mask = 1u << Bitmap::IndexInCell(end_index); in SetRange()
56 void Bitmap::ClearRange(uint32_t start_index, uint32_t end_index) { in ClearRange()
57 unsigned int start_cell_index = start_index >> Bitmap::kBitsPerCellLog2; in ClearRange()
58 MarkBit::CellType start_index_mask = 1u << Bitmap::IndexInCell(start_index); in ClearRange()
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowBitmap.java7 import android.graphics.Bitmap;
27 @Implements(Bitmap.class)
33 private Bitmap realBitmap;
40 private Bitmap createdFromBitmap;
54 private Bitmap.Config config;
67 public static String visualize(Bitmap bitmap) { in visualize()
78 public Bitmap getCreatedFromBitmap() { in getCreatedFromBitmap()
187 protected boolean compress(Bitmap.CompressFormat format, int quality, OutputStream stream) { in compress()
193 protected static Bitmap createBitmap(int width, int height, Bitmap.Config config) { in createBitmap()
198 protected static Bitmap createBitmap( in createBitmap()
[all …]
DShadowBitmapFactory.java9 import android.graphics.Bitmap;
39 protected static Bitmap decodeResourceStream( in decodeResourceStream()
41 Bitmap bitmap = directlyOn(BitmapFactory.class, "decodeResourceStream", in decodeResourceStream()
56 protected static Bitmap decodeResource(Resources res, int id, BitmapFactory.Options options) { in decodeResource()
66 Bitmap bitmap = create("resource:" + res.getResourceName(id), options, imageSizeFromStream); in decodeResource()
73 protected static Bitmap decodeFile(String pathName) { in decodeFile()
78 protected static Bitmap decodeFile(String pathName, BitmapFactory.Options options) { in decodeFile()
79 Bitmap bitmap = create("file:" + pathName, options); in decodeFile()
87 protected static Bitmap decodeFileDescriptor( in decodeFileDescriptor()
89 Bitmap bitmap = create("fd:" + fd, opts); in decodeFileDescriptor()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/
DTransformationUtils.java4 import android.graphics.Bitmap;
38 public static Bitmap centerCrop(Bitmap recycled, Bitmap toCrop, int width, int height) { in centerCrop()
58 final Bitmap result; in centerCrop()
62 result = Bitmap.createBitmap(width, height, toCrop.getConfig() == null in centerCrop()
63 ? Bitmap.Config.ARGB_8888 : toCrop.getConfig()); in centerCrop()
86 public static Bitmap fitCenter(Bitmap toFit, BitmapPool pool, int width, int height) { in fitCenter()
110Bitmap.Config config = toFit.getConfig() != null ? toFit.getConfig() : Bitmap.Config.ARGB_8888; in fitCenter()
111 Bitmap toReuse = pool.get(targetWidth, targetHeight, config); in fitCenter()
113 toReuse = Bitmap.createBitmap(targetWidth, targetHeight, config); in fitCenter()
143 public static void setAlpha(Bitmap toTransform, Bitmap outBitmap) { in setAlpha()
[all …]
DBitmapEncoder.java3 import android.graphics.Bitmap;
25 public class BitmapEncoder implements ResourceEncoder<Bitmap> {
28 private Bitmap.CompressFormat compressFormat;
35 public BitmapEncoder(Bitmap.CompressFormat compressFormat, int quality) { in BitmapEncoder()
41 public boolean encode(Resource<Bitmap> resource, OutputStream os) { in encode()
42 final Bitmap bitmap = resource.get(); in encode()
45 Bitmap.CompressFormat format = getFormat(bitmap); in encode()
59 private Bitmap.CompressFormat getFormat(Bitmap bitmap) { in getFormat()
63 return Bitmap.CompressFormat.PNG; in getFormat()
65 return Bitmap.CompressFormat.JPEG; in getFormat()
DBitmapTransformation.java4 import android.graphics.Bitmap;
31 public abstract class BitmapTransformation implements Transformation<Bitmap> {
44 … public final Resource<Bitmap> transform(Resource<Bitmap> resource, int outWidth, int outHeight) { in transform()
49 Bitmap toTransform = resource.get(); in transform()
50 Bitmap transformed = transform(bitmapPool, toTransform, outWidth, outHeight); in transform()
52 final Resource<Bitmap> result; in transform()
74 …protected abstract Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeig… in transform()
DImageVideoDataLoadProvider.java3 import android.graphics.Bitmap;
20 public class ImageVideoDataLoadProvider implements DataLoadProvider<ImageVideoWrapper, Bitmap> {
22 private final ResourceDecoder<File, Bitmap> cacheDecoder;
23 private final ResourceEncoder<Bitmap> encoder;
26 public ImageVideoDataLoadProvider(DataLoadProvider<InputStream, Bitmap> streamBitmapProvider, in ImageVideoDataLoadProvider()
27 DataLoadProvider<ParcelFileDescriptor, Bitmap> fileDescriptorBitmapProvider) { in ImageVideoDataLoadProvider()
37 public ResourceDecoder<File, Bitmap> getCacheDecoder() { in getCacheDecoder()
42 public ResourceDecoder<ImageVideoWrapper, Bitmap> getSourceDecoder() { in getSourceDecoder()
52 public ResourceEncoder<Bitmap> getEncoder() { in getEncoder()
DImageVideoBitmapDecoder.java3 import android.graphics.Bitmap;
20 public class ImageVideoBitmapDecoder implements ResourceDecoder<ImageVideoWrapper, Bitmap> {
22 private final ResourceDecoder<InputStream, Bitmap> streamDecoder;
23 private final ResourceDecoder<ParcelFileDescriptor, Bitmap> fileDescriptorDecoder;
25 public ImageVideoBitmapDecoder(ResourceDecoder<InputStream, Bitmap> streamDecoder, in ImageVideoBitmapDecoder()
26 ResourceDecoder<ParcelFileDescriptor, Bitmap> fileDescriptorDecoder) { in ImageVideoBitmapDecoder()
34 …public Resource<Bitmap> decode(ImageVideoWrapper source, int width, int height) throws IOException… in decode()
35 Resource<Bitmap> result = null; in decode()
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/
DAttributeStrategy.java3 import android.graphics.Bitmap;
12 private final GroupedLinkedMap<Key, Bitmap> groupedMap = new GroupedLinkedMap<Key, Bitmap>();
14 public void put(Bitmap bitmap) { in put()
21 public Bitmap get(int width, int height, Bitmap.Config config) { in get()
28 public Bitmap removeLast() { in removeLast()
33 public String logBitmap(Bitmap bitmap) { in logBitmap()
38 public String logBitmap(int width, int height, Bitmap.Config config) { in logBitmap()
43 public int getSize(Bitmap bitmap) { in getSize()
52 private static String getBitmapString(Bitmap bitmap) { in getBitmapString()
56 private static String getBitmapString(int width, int height, Bitmap.Config config) { in getBitmapString()
[all …]
DLruBitmapPool.java5 import android.graphics.Bitmap;
22 private static final Bitmap.Config DEFAULT_CONFIG = Bitmap.Config.ARGB_8888;
64 public synchronized boolean put(Bitmap bitmap) { in put()
94 public synchronized Bitmap get(int width, int height, Bitmap.Config config) { in get()
95 Bitmap result = getDirty(width, height, config); in get()
108 public synchronized Bitmap getDirty(int width, int height, Bitmap.Config config) { in getDirty()
111 final Bitmap result = strategy.get(width, height, config != null ? config : DEFAULT_CONFIG); in getDirty()
150 final Bitmap removed = strategy.removeLast(); in trimToSize()
180 void add(Bitmap bitmap); in add()
181 void remove(Bitmap bitmap); in remove()
[all …]
DLruPoolStrategy.java3 import android.graphics.Bitmap;
6 void put(Bitmap bitmap); in put()
7 Bitmap get(int width, int height, Bitmap.Config config); in get()
8 Bitmap removeLast(); in removeLast()
9 String logBitmap(Bitmap bitmap); in logBitmap()
10 String logBitmap(int width, int height, Bitmap.Config config); in logBitmap()
11 int getSize(Bitmap bitmap); in getSize()
DSizeStrategy.java4 import android.graphics.Bitmap;
19 private final GroupedLinkedMap<Key, Bitmap> groupedMap = new GroupedLinkedMap<Key, Bitmap>();
23 public void put(Bitmap bitmap) { in put()
34 public Bitmap get(int width, int height, Bitmap.Config config) { in get()
45 final Bitmap result = groupedMap.get(key); in get()
55 public Bitmap removeLast() { in removeLast()
56 Bitmap removed = groupedMap.removeLast(); in removeLast()
74 public String logBitmap(Bitmap bitmap) { in logBitmap()
79 public String logBitmap(int width, int height, Bitmap.Config config) { in logBitmap()
85 public int getSize(Bitmap bitmap) { in getSize()
[all …]
DBitmapPool.java3 import android.graphics.Bitmap;
49 boolean put(Bitmap bitmap); in put()
78 Bitmap get(int width, int height, Bitmap.Config config); in get()
98 Bitmap getDirty(int width, int height, Bitmap.Config config); in getDirty()
DBitmapPoolAdapter.java3 import android.graphics.Bitmap;
21 public boolean put(Bitmap bitmap) { in put()
26 public Bitmap get(int width, int height, Bitmap.Config config) { in get()
31 public Bitmap getDirty(int width, int height, Bitmap.Config config) { in getDirty()
/external/mesa3d/src/gallium/state_trackers/hgl/
Dbitmap_wrapper.h35 typedef void Bitmap; typedef
42 Bitmap* create_bitmap(int32 width, int32 height, color_space colorSpace);
43 void delete_bitmap(Bitmap* bitmap);
45 void copy_bitmap_bits(const Bitmap* bitmap, void* data, int32 length);
46 void import_bitmap_bits(const Bitmap* bitmap, void* data, int32 length,
49 void get_bitmap_size(const Bitmap* bitmap, int32* width, int32* height);
50 color_space get_bitmap_color_space(const Bitmap* bitmap);
51 int32 get_bitmap_bytes_per_row(const Bitmap* bitmap);
52 int32 get_bitmap_bits_length(const Bitmap* bitmap);
54 void dump_bitmap(const Bitmap* bitmap);
Dbitmap_wrapper.cpp43 Bitmap*
48 return (Bitmap*)bb; in create_bitmap()
54 get_bitmap_size(const Bitmap* bitmap, int32* width, int32* height) in get_bitmap_size()
67 get_bitmap_color_space(const Bitmap* bitmap) in get_bitmap_color_space()
77 copy_bitmap_bits(const Bitmap* bitmap, void* data, int32 length) in copy_bitmap_bits()
88 import_bitmap_bits(const Bitmap* bitmap, void* data, int32 length, in import_bitmap_bits()
100 delete_bitmap(Bitmap* bitmap) in delete_bitmap()
108 get_bitmap_bytes_per_row(const Bitmap* bitmap) in get_bitmap_bytes_per_row()
118 get_bitmap_bits_length(const Bitmap* bitmap) in get_bitmap_bits_length()
128 dump_bitmap(const Bitmap* bitmap) in dump_bitmap()
/external/glide/library/src/main/java/com/bumptech/glide/
DBitmapTypeRequest.java3 import android.graphics.Bitmap;
23 public class BitmapTypeRequest<ModelType> extends BitmapRequestBuilder<ModelType, Bitmap> {
29 …private static <A, R> FixedLoadProvider<A, ImageVideoWrapper, Bitmap, R> buildProvider(Glide glide, in buildProvider()
32 Class<R> transcodedClass, ResourceTranscoder<Bitmap, R> transcoder) { in buildProvider() argument
38 transcoder = glide.buildTranscoder(Bitmap.class, transcodedClass); in buildProvider()
40 …DataLoadProvider<ImageVideoWrapper, Bitmap> loadProvider = glide.buildDataProvider(ImageVideoWrapp… in buildProvider()
41 Bitmap.class); in buildProvider()
45 …return new FixedLoadProvider<A, ImageVideoWrapper, Bitmap, R>(modelLoader, transcoder, loadProvide… in buildProvider()
52 …super(buildProvider(other.glide, streamModelLoader, fileDescriptorModelLoader, Bitmap.class, null), in BitmapTypeRequest()
53 Bitmap.class, other); in BitmapTypeRequest()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/prefill/
DPreFillType.java3 import android.graphics.Bitmap;
11 static final Bitmap.Config DEFAULT_CONFIG = Bitmap.Config.RGB_565;
14 private final Bitmap.Config config;
29 PreFillType(int width, int height, Bitmap.Config config, int weight) { in PreFillType()
57 Bitmap.Config getConfig() { in getConfig()
106 private Bitmap.Config config;
138 public Builder setConfig(Bitmap.Config config) { in setConfig()
146 Bitmap.Config getConfig() { in getConfig()
/external/volley/src/main/java/com/android/volley/toolbox/
DImageRequest.java19 import android.graphics.Bitmap;
20 import android.graphics.Bitmap.Config;
34 public class ImageRequest extends Request<Bitmap> {
49 private Response.Listener<Bitmap> mListener;
76 Response.Listener<Bitmap> listener, in ImageRequest()
102 Response.Listener<Bitmap> listener, in ImageRequest()
181 protected Response<Bitmap> parseNetworkResponse(NetworkResponse response) { in parseNetworkResponse()
194 private Response<Bitmap> doParse(NetworkResponse response) { in doParse()
197 Bitmap bitmap = null; in doParse()
222 Bitmap tempBitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); in doParse()
[all …]
/external/droiddriver/src/io/appium/droiddriver/instrumentation/
DInstrumentationUiDevice.java19 import android.graphics.Bitmap;
20 import android.graphics.Bitmap.Config;
42 protected Bitmap takeScreenshot() { in takeScreenshot()
57 private static class GetScreenshot implements Callable<Bitmap> {
65 public Bitmap call() { in call()
66 Bitmap screenshot; in call()
69 Bitmap drawingCache = rootView.getDrawingCache(); in call()
74 screenshot = Bitmap.createBitmap(drawingCache); in call()
80 Bitmap.createBitmap(rect.width() + xy[0], rect.height() + xy[1], Config.ARGB_8888); in call()
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/gif/
DGifResourceEncoder.java3 import android.graphics.Bitmap;
48 Transformation<Bitmap> transformation = drawable.getFrameTransformation(); in encode()
61 Bitmap currentFrame = decoder.getNextFrame(); in encode()
62 …Resource<Bitmap> transformedResource = getTransformedFrame(currentFrame, transformation, drawable); in encode()
112 …private Resource<Bitmap> getTransformedFrame(Bitmap currentFrame, Transformation<Bitmap> transform… in getTransformedFrame()
115 Resource<Bitmap> bitmapResource = factory.buildFrameResource(currentFrame, bitmapPool); in getTransformedFrame()
116 Resource<Bitmap> transformedResource = transformation.transform(bitmapResource, in getTransformedFrame()
144 public Resource<Bitmap> buildFrameResource(Bitmap bitmap, BitmapPool bitmapPool) { in buildFrameResource()
DGifDrawableTransformation.java3 import android.graphics.Bitmap;
15 private final Transformation<Bitmap> wrapped;
18 public GifDrawableTransformation(Transformation<Bitmap> wrapped, BitmapPool bitmapPool) { in GifDrawableTransformation()
31 Bitmap firstFrame = resource.get().getFirstFrame(); in transform()
32 Resource<Bitmap> bitmapResource = new BitmapResource(firstFrame, bitmapPool); in transform()
33 Resource<Bitmap> transformed = wrapped.transform(bitmapResource, outWidth, outHeight); in transform()
37 Bitmap transformedFrame = transformed.get(); in transform()

12345678910>>...12