Searched refs:pixels (Results 1 - 25 of 70) sorted by relevance

123

/frameworks/support/v7/palette/src/android/support/v7/graphics/
H A DColorHistogram.java33 * @param pixels array of image contents
35 ColorHistogram(final int[] pixels) { argument
36 // Sort the pixels to enable counting below
37 Arrays.sort(pixels);
40 mNumberColors = countDistinctColors(pixels);
47 countFrequencies(pixels);
71 private static int countDistinctColors(final int[] pixels) { argument
72 if (pixels.length < 2) {
73 // If we have less than 2 pixels we can stop here
74 return pixels
93 countFrequencies(final int[] pixels) argument
[all...]
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/performance/
H A DThroughput.java30 public Throughput(int totalFrames, int periodFrames, int periodTime, int pixels) { argument
34 mPixels = pixels;
/frameworks/webview/chromium/plat_support/
H A Dgraphics_utils.cpp72 PixelInfo* pixels = new PixelInfo(canvas); local
73 if (!pixels->state) {
74 delete pixels;
75 pixels = NULL;
77 return pixels;
80 void ReleasePixels(AwPixelInfo* pixels) { argument
81 delete static_cast<PixelInfo*>(pixels);
/frameworks/base/core/java/android/hardware/camera2/
H A DDngCreator.java148 * @param pixels a {@link android.graphics.Bitmap} of pixel data.
153 public DngCreator setThumbnail(Bitmap pixels) { argument
154 if (pixels == null) {
158 int width = pixels.getWidth();
159 int height = pixels.getHeight();
167 ByteBuffer rgbBuffer = convertToRGB(pixels);
182 * @param pixels an {@link android.media.Image} object with the format
188 public DngCreator setThumbnail(Image pixels) { argument
189 if (pixels == null) {
193 int format = pixels
296 writeInputStream(OutputStream dngOutput, Size size, InputStream pixels, long offset) argument
348 writeByteBuffer(OutputStream dngOutput, Size size, ByteBuffer pixels, long offset) argument
384 writeImage(OutputStream dngOutput, Image pixels) argument
449 writeByteBuffer(int width, int height, ByteBuffer pixels, OutputStream dngOutput, int pixelStride, int rowStride, long offset) argument
[all...]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/
H A DFaceSquareFilter.java70 byte[] pixels = buffer.array();
74 drawBoxes(pixels, faces, dims);
82 public void drawBoxes(byte[] pixels, Face[] faces, int[] dims) { argument
114 pixels[ImageConstants.PIX_CHANNELS * (dims[0] * (top + j) + left) +
116 pixels[ImageConstants.PIX_CHANNELS * (dims[0] * (top + j) + left) +
118 pixels[ImageConstants.PIX_CHANNELS * (dims[0] * (top + j) + left) +
124 pixels[ImageConstants.PIX_CHANNELS * (dims[0] * (top + j) + right) +
126 pixels[ImageConstants.PIX_CHANNELS * (dims[0] * (top + j) + right) +
128 pixels[ImageConstants.PIX_CHANNELS * (dims[0] * (top + j) + right) +
136 pixels[ImageConstant
[all...]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/
H A DFaceSquareFilterTest.java79 int[] pixels = new int[bitmap.getByteCount()];
80 bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(),
116 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) +
118 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) +
120 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) +
126 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + right) +
128 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + right) +
130 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + right) +
138 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * top + left + k) +
140 pixels[ImageConstant
[all...]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
H A DGLToolbox.java70 public static void readFbo(int fboId, ByteBuffer pixels, int width, int height) { argument
72 GLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pixels);
76 public static void readTarget(RenderTarget target, ByteBuffer pixels, int width, int height) { argument
78 GLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pixels);
114 public static void setTexturePixels(int texId, int target, ByteBuffer pixels, argument
118 // For some devices, "pixels" being null causes system error.
119 if (pixels == null) {
120 pixels = ByteBuffer.allocateDirect(width * height * 4);
123 GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pixels);
H A DTextureSource.java69 public void allocateWithPixels(ByteBuffer pixels, int width, int height) { argument
70 //Log.i("TextureSource", "Uploading pixels to texture " + mTexId + ": " + width + "x" + height + ".");
71 GLToolbox.setTexturePixels(mTexId, mTarget, pixels, width, height);
76 //Log.i("TextureSource", "Uploading pixels to texture " + mTexId + "!");
H A DBackingStore.java605 ByteBuffer pixels = (ByteBuffer) backing.lock(ACCESS_BYTES);
606 mTexture.allocateWithPixels(pixels, mDimensions[0], mDimensions[1]);
627 ByteBuffer pixels = ByteBuffer.allocateDirect(getSize());
628 allocation.copyTo(pixels.array());
629 mTexture.allocateWithPixels(pixels, mDimensions[0], mDimensions[1]);
846 ByteBuffer pixels = ByteBuffer.allocateDirect(getSize());
847 GLToolbox.readTarget(target, pixels, mDimensions[0], mDimensions[1]);
848 mAllocation.copyFrom(pixels.array());
H A DRenderTarget.java265 public void readPixelData(ByteBuffer pixels, int width, int height) { argument
266 GLToolbox.readTarget(this, pixels, width, height);
270 ByteBuffer pixels = ByteBuffer.allocateDirect(width * height * 4);
271 GLToolbox.readTarget(this, pixels, width, height);
272 return pixels;
/frameworks/base/packages/PrintSpooler/jni/
H A Dcom_android_printspooler_util_BitmapSerializeUtils.cpp107 // Lock the pixels.
108 void* pixels; local
109 result = AndroidBitmap_lockPixels(env, jbitmap, &pixels);
111 throwIllegalStateException(env, (char*) "Cannot lock bitmap pixels");
115 // Read the pixels.
117 read = readAllBytes(fd, (void*) pixels, byteCount);
119 throwIllegalStateException(env, (char*) "Cannot read bitmap pixels");
123 // Unlock the pixels.
126 throwIllegalStateException(env, (char*) "Cannot unlock bitmap pixels");
146 // Lock the pixels
147 void* pixels; local
[all...]
/frameworks/base/media/mca/filterfw/native/core/
H A Dgl_frame.h66 // Copies the pixels from another GL frame to this frame.
141 // Copies pixels from texture or FBO to the specified buffer.
144 // Reads the pixels from the internal texture to the given buffer.
145 bool ReadTexturePixels(uint8_t* pixels) const;
147 // Reads the pixels from the internal FBO to the given buffer.
148 bool ReadFboPixels(uint8_t* pixels) const;
150 // Writes the specified pixels to the internal texture.
151 bool UploadTexturePixels(const uint8_t* pixels);
H A Dgl_frame.cpp347 bool GLFrame::ReadFboPixels(uint8_t* pixels) const {
356 pixels);
362 bool GLFrame::ReadTexturePixels(uint8_t* pixels) const {
363 // Read pixels from texture if we do not have an FBO
388 return target.ReadFboPixels(pixels);
448 bool GLFrame::UploadTexturePixels(const uint8_t* pixels) { argument
454 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/
H A DBitmapTest.java89 int[] pixels = new int[100];
90 bm.getPixels(pixels, 0, 10, 0, 0, 10, 10);
93 assertEquals("getPixels", p, pixels[i]);
114 int[] pixels = new int[100];
115 bm.getPixels(pixels, 0, 10, 0, 0, 10, 10);
118 assertEquals("getPixels", p, pixels[i]);
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
H A DIconLoader.java245 int[] pixels = new int[numOfPixels];
256 pixels[pixelIndex++] = bitToBnW((currentByte >> bitIndex-- ) & 0x01);
262 return Bitmap.createBitmap(pixels, width, height, Bitmap.Config.ARGB_8888);
302 int[] pixels = new int[numOfPixels];
319 pixels[pixelIndex++] = Color.rgb(clut[clutIndex],
324 return Bitmap.createBitmap(pixels, width, height,
/frameworks/base/media/mca/filterfw/jni/
H A Djni_gl_frame.cpp201 // Read the frame pixels
202 uint8_t* pixels = new uint8_t[frame->Size()]; local
203 frame->CopyDataTo(pixels, frame->Size());
206 ConvertRGBAToFloats(pixels, frame->Size(), float_array);
209 delete[] pixels;
222 uint8_t* pixels; local
223 const int result = AndroidBitmap_lockPixels(env, bitmap, reinterpret_cast<void**>(&pixels));
225 const bool success = frame->WriteData(pixels, size);
238 uint8_t* pixels; local
239 const int result = AndroidBitmap_lockPixels(env, bitmap, reinterpret_cast<void**>(&pixels));
[all...]
/frameworks/ex/framesequence/jni/
H A DFrameSequenceJNI.cpp99 void* pixels; local
107 if ((ret = AndroidBitmap_lockPixels(env, bitmap, &pixels)) < 0) {
109 "Bitmap pixels couldn't be locked");
115 (Color8888*) pixels, pixelStride, previousFrameNr);
/frameworks/base/libs/hwui/
H A DGradientCache.cpp244 uint8_t pixels[rowBytes * texture->height]; local
268 uint8_t* dst = pixels;
285 memcpy(pixels + rowBytes, pixels, rowBytes);
294 GL_RGBA, GL_FLOAT, pixels);
297 GL_RGBA, GL_UNSIGNED_BYTE, pixels);
/frameworks/base/tests/touchlag/
H A Dtouchlag.cpp46 uint32_t* pixels; member in union:Buffer::__anon1015
51 android_memset32(buf->pixels, pixel, buf->s * buf->h * 4);
56 uint32_t* bits = buf->pixels + y * buf->s;
78 uint32_t* bits = buf->pixels + y * buf->s + x;
97 uint32_t* bits = buf->pixels + y * buf->s + x;
/frameworks/base/graphics/java/android/graphics/
H A DBitmap.java322 * to try to access its pixels, and the bitmap will not draw.
383 * how pixels are stored. This affects the quality (color depth) as
462 * <p>Copy the bitmap's pixels into the specified buffer (allocated by the
464 * hold all of the pixels (taking into account the number of bytes per
468 * that if this bitmap stores its pixels pre-multiplied
492 throw new RuntimeException("Buffer not large enough for pixels");
504 * <p>Copy the pixels from the buffer, beginning at the current position,
505 * overwriting the bitmap's pixels. The data in the buffer is not changed
532 throw new RuntimeException("Buffer not large enough for pixels");
546 * this bitmap's pixels int
1335 getPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height) argument
1375 checkPixelsAccess(int x, int y, int width, int height, int offset, int stride, int pixels[]) argument
1449 setPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height) argument
1626 nativeGetPixels(long nativeBitmap, int[] pixels, int offset, int stride, int x, int y, int width, int height) argument
[all...]
/frameworks/support/v8/renderscript/jni/
H A Dandroid_renderscript_RenderScript.cpp358 void *pixels = NULL; local
359 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
361 if (pixels != NULL) {
364 pixels, GetBitmapSize(_env, jbitmap), usage);
374 void *pixels = NULL; local
375 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
377 if (pixels != NULL) {
380 (uint32_t)usage, (uintptr_t)pixels);
389 void *pixels = NULL; local
390 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
409 void *pixels = NULL; local
427 void *pixels = NULL; local
[all...]
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/
H A DSpinnerCompat.java262 * Set a vertical offset in pixels for the spinner's popup window of choices. Only valid in
265 * @param pixels Vertical offset in pixels
267 public void setDropDownVerticalOffset(int pixels) { argument
268 mPopup.setVerticalOffset(pixels);
272 * Get the configured vertical offset in pixels for the spinner's popup window of choices. Only
275 * @return Vertical offset in pixels
282 * Set a horizontal offset in pixels for the spinner's popup window of choices. Only valid in
285 * @param pixels Horizontal offset in pixels
287 setDropDownHorizontalOffset(int pixels) argument
311 setDropDownWidth(int pixels) argument
[all...]
/frameworks/av/cmds/screenrecord/
H A DTextRenderer.cpp47 // avoid reading pixels from adjacent glyphs in the texture filter.
111 if ((FontBitmap::pixels[i] & 1) == 0) {
114 alpha = FontBitmap::pixels[i] & ~1;
117 color = FontBitmap::pixels[i] & ~1;
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
H A DIccUtils.java395 int[] pixels = new int[numOfPixels];
406 pixels[pixelIndex++] = bitToRGB((currentByte >> bitIndex-- ) & 0x01);
412 return Bitmap.createBitmap(pixels, width, height, Bitmap.Config.ARGB_8888);
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
H A DIccUtils.java395 int[] pixels = new int[numOfPixels];
406 pixels[pixelIndex++] = bitToRGB((currentByte >> bitIndex-- ) & 0x01);
412 return Bitmap.createBitmap(pixels, width, height, Bitmap.Config.ARGB_8888);

Completed in 841 milliseconds

123