Home
last modified time | relevance | path

Searched refs:GraphicBuffer (Results 1 – 25 of 270) sorted by relevance

1234567891011

/frameworks/native/libs/ui/
DGraphicBuffer.cpp48 sp<GraphicBuffer> GraphicBuffer::from(ANativeWindowBuffer* anwb) { in from()
49 return static_cast<GraphicBuffer *>(anwb); in from()
52 GraphicBuffer* GraphicBuffer::fromAHardwareBuffer(AHardwareBuffer* buffer) { in fromAHardwareBuffer()
53 return reinterpret_cast<GraphicBuffer*>(buffer); in fromAHardwareBuffer()
56 GraphicBuffer const* GraphicBuffer::fromAHardwareBuffer(AHardwareBuffer const* buffer) { in fromAHardwareBuffer()
57 return reinterpret_cast<GraphicBuffer const*>(buffer); in fromAHardwareBuffer()
60 AHardwareBuffer* GraphicBuffer::toAHardwareBuffer() { in toAHardwareBuffer()
64 AHardwareBuffer const* GraphicBuffer::toAHardwareBuffer() const { in toAHardwareBuffer()
68 GraphicBuffer::GraphicBuffer() in GraphicBuffer() function in android::GraphicBuffer
83 GraphicBuffer::GraphicBuffer(uint32_t inWidth, uint32_t inHeight, in GraphicBuffer() function in android::GraphicBuffer
[all …]
/frameworks/native/libs/ui/include_vndk/ui/
DGraphicBuffer.h53 class GraphicBuffer
54 : public ANativeObjectBase<ANativeWindowBuffer, GraphicBuffer, RefBase>,
55 public Flattenable<GraphicBuffer>
57 friend class Flattenable<GraphicBuffer>;
85 static sp<GraphicBuffer> from(ANativeWindowBuffer *);
87 static GraphicBuffer* fromAHardwareBuffer(AHardwareBuffer*);
88 static GraphicBuffer const* fromAHardwareBuffer(AHardwareBuffer const*);
93 GraphicBuffer();
97 GraphicBuffer(uint32_t inWidth, uint32_t inHeight, PixelFormat inFormat,
134 GraphicBuffer(const native_handle_t* inHandle, HandleWrapMethod method, uint32_t inWidth,
[all …]
/frameworks/native/libs/ui/include/ui/
DGraphicBuffer.h53 class GraphicBuffer
54 : public ANativeObjectBase<ANativeWindowBuffer, GraphicBuffer, RefBase>,
55 public Flattenable<GraphicBuffer>
57 friend class Flattenable<GraphicBuffer>;
85 static sp<GraphicBuffer> from(ANativeWindowBuffer *);
87 static GraphicBuffer* fromAHardwareBuffer(AHardwareBuffer*);
88 static GraphicBuffer const* fromAHardwareBuffer(AHardwareBuffer const*);
93 GraphicBuffer();
97 GraphicBuffer(uint32_t inWidth, uint32_t inHeight, PixelFormat inFormat,
134 GraphicBuffer(const native_handle_t* inHandle, HandleWrapMethod method, uint32_t inWidth,
[all …]
/frameworks/native/libs/ui/tests/
DGraphicBuffer_test.cpp32 constexpr uint64_t kTestUsage = GraphicBuffer::USAGE_SW_WRITE_OFTEN;
40 sp<GraphicBuffer> gb(new GraphicBuffer(kTestWidth, kTestHeight, format, kTestLayerCount, in TEST_F()
49 sp<GraphicBuffer> gb(new GraphicBuffer(width, height, format, kTestLayerCount, kTestUsage, in TEST_F()
61 sp<GraphicBuffer> gb(new GraphicBuffer(std::move(b1))); in TEST_F()
72 sp<GraphicBuffer> gb( in TEST_F()
73 new GraphicBuffer(kTestWidth, kTestHeight, kTestFormat, kTestLayerCount, kTestUsage)); in TEST_F()
88 sp<GraphicBuffer> gb(new GraphicBuffer(std::move(b1))); in TEST_F()
98 sp<GraphicBuffer> gb1(new GraphicBuffer(std::move(b1))); in TEST_F()
124 GraphicBuffer* gb2 = new GraphicBuffer(); in TEST_F()
/frameworks/base/core/jni/
Dandroid_hardware_HardwareBuffer.cpp63 explicit GraphicBufferWrapper(const sp<GraphicBuffer>& buffer) in GraphicBufferWrapper()
66 sp<GraphicBuffer> buffer;
86 sp<GraphicBuffer> buffer = new GraphicBuffer(width, height, pixelFormat, layers, in android_hardware_HardwareBuffer_create()
101 sp<GraphicBuffer> buffer(graphicBufferForJavaObject(env, graphicBuffer)); in android_hardware_HardwareBuffer_createFromGraphicBuffer()
133 static inline GraphicBuffer* GraphicBufferWrapper_to_GraphicBuffer( in GraphicBufferWrapper_to_GraphicBuffer()
140 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getWidth()
146 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getHeight()
152 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getFormat()
159 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getLayers()
165 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getUsage()
[all …]
/frameworks/base/graphics/java/android/graphics/
DGraphicBuffer.java29 public class GraphicBuffer implements Parcelable { class
78 public static GraphicBuffer create(int width, int height, int format, int usage) { in create()
81 return new GraphicBuffer(width, height, format, usage, nativeObject); in create()
90 private GraphicBuffer(int width, int height, int format, int usage, long nativeObject) { in GraphicBuffer() method in GraphicBuffer
103 public static GraphicBuffer createFromExisting(int width, int height, in createFromExisting()
107 return new GraphicBuffer(width, height, format, usage, nativeObject); in createFromExisting()
282 public static final @android.annotation.NonNull Parcelable.Creator<GraphicBuffer> CREATOR =
283 new Parcelable.Creator<GraphicBuffer>() {
284 public GraphicBuffer createFromParcel(Parcel in) {
291 return new GraphicBuffer(width, height, format, usage, nativeObject);
[all …]
/frameworks/native/services/surfaceflinger/CompositionEngine/tests/
DHwcBufferCacheTest.cpp27 void getHwcBuffer(int slot, const sp<GraphicBuffer>& buffer, uint32_t* outSlot, in getHwcBuffer()
28 sp<GraphicBuffer>* outBuffer) { in getHwcBuffer()
39 sp<GraphicBuffer> outBuffer; in testSlot()
63 mCache.getHwcBuffer(inSlot, sp<GraphicBuffer>(), &outSlot, &outBuffer); in testSlot()
69 sp<GraphicBuffer> mBuffer1{new GraphicBuffer(1, 1, HAL_PIXEL_FORMAT_RGBA_8888, 1, 0)};
70 sp<GraphicBuffer> mBuffer2{new GraphicBuffer(1, 1, HAL_PIXEL_FORMAT_RGBA_8888, 1, 0)};
DRenderSurfaceTest.cpp263 sp<GraphicBuffer> buffer = new GraphicBuffer(); in TEST_F()
280 sp<GraphicBuffer> buffer = new GraphicBuffer(); in TEST_F()
294 sp<GraphicBuffer> buffer = new GraphicBuffer(); in TEST_F()
308 sp<GraphicBuffer> buffer = new GraphicBuffer(); in TEST_F()
323 sp<GraphicBuffer> buffer = new GraphicBuffer(); in TEST_F()
340 sp<GraphicBuffer> buffer = new GraphicBuffer(); in TEST_F()
/frameworks/base/native/webview/plat_support/
Dgraphic_buffer_impl.cpp27 : mBuffer(new android::GraphicBuffer(w, h, PIXEL_FORMAT_RGBA_8888, in GraphicBufferImpl()
28 android::GraphicBuffer::USAGE_HW_TEXTURE | in GraphicBufferImpl()
29 android::GraphicBuffer::USAGE_SW_READ_OFTEN | in GraphicBufferImpl()
30 android::GraphicBuffer::USAGE_SW_WRITE_OFTEN)) { in GraphicBufferImpl()
81 usage = android::GraphicBuffer::USAGE_SW_READ_OFTEN; in Map()
84 usage = android::GraphicBuffer::USAGE_SW_WRITE_OFTEN; in Map()
87 usage = android::GraphicBuffer::USAGE_SW_READ_OFTEN | in Map()
88 android::GraphicBuffer::USAGE_SW_WRITE_OFTEN; in Map()
/frameworks/native/libs/gui/include/gui/
DGLConsumer.h138 const sp<GraphicBuffer>& buf, const Rect& cropRect,
182 sp<GraphicBuffer> getCurrentBuffer(int* outSlot = nullptr) const;
254 const sp<GraphicBuffer> graphicBuffer,
258 const sp<GraphicBuffer> graphicBuffer, EGLSyncKHR eglFence) { in releaseBufferLocked()
268 sp<GraphicBuffer> graphicBuffer;
304 explicit EglImage(sp<GraphicBuffer> graphicBuffer);
315 const sp<GraphicBuffer>& graphicBuffer() { return mGraphicBuffer; } in graphicBuffer()
327 const sp<GraphicBuffer>& graphicBuffer);
334 sp<GraphicBuffer> mGraphicBuffer;
372 static sp<GraphicBuffer> getDebugTexImageBuffer();
[all …]
DConsumerBase.h36 class GraphicBuffer; variable
201 const sp<GraphicBuffer> graphicBuffer,
205 bool stillTracking(int slot, const sp<GraphicBuffer> graphicBuffer);
213 const sp<GraphicBuffer> graphicBuffer, const sp<Fence>& fence);
215 const sp<GraphicBuffer> graphicBuffer, const sp<Fence>& fence);
222 sp<GraphicBuffer> mGraphicBuffer;
DSurface.h51 virtual void onBuffersDiscarded(const std::vector<sp<GraphicBuffer>>& buffers) = 0;
153 status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer,
298 virtual int detachNextBuffer(sp<GraphicBuffer>* outBuffer,
311 status_t getAndFlushRemovedBuffers(std::vector<sp<GraphicBuffer>>* out);
315 static status_t attachAndQueueBufferWithDataspace(Surface* surface, sp<GraphicBuffer> buffer,
348 sp<GraphicBuffer> buffer;
454 sp<GraphicBuffer> mLockedBuffer;
455 sp<GraphicBuffer> mPostedBuffer;
508 std::vector<sp<GraphicBuffer>> mRemovedBuffers;
512 std::vector<sp<GraphicBuffer>>* outBuffers);
/frameworks/base/libs/hwui/surfacetexture/
DEGLConsumer.h127 sp<GraphicBuffer> graphicBuffer;
170 EglImage(sp<GraphicBuffer> graphicBuffer);
184 const sp<GraphicBuffer>& graphicBuffer() { return mGraphicBuffer; } in graphicBuffer()
195 EGLImageKHR createImage(EGLDisplay dpy, const sp<GraphicBuffer>& graphicBuffer);
202 sp<GraphicBuffer> mGraphicBuffer;
233 static sp<GraphicBuffer> getDebugTexImageBuffer();
241 static const uint64_t DEFAULT_USAGE_FLAGS = GraphicBuffer::USAGE_HW_TEXTURE;
307 static sp<GraphicBuffer> sReleasedTexImageBuffer;
/frameworks/base/core/jni/android/graphics/
DGraphicBuffer.cpp54 #define LOCK_CANVAS_USAGE (GraphicBuffer::USAGE_SW_READ_OFTEN | GraphicBuffer::USAGE_SW_WRITE_OFTEN)
95 explicit GraphicBufferWrapper(const sp<GraphicBuffer>& buffer): buffer(buffer) { in GraphicBufferWrapper()
98 const sp<GraphicBuffer>& get() const { in get()
104 sp<GraphicBuffer> const buffer;
113 sp<GraphicBuffer> b(reinterpret_cast<GraphicBuffer*>(unwrapped)); in android_graphics_GraphicBuffer_wrap()
123 sp<GraphicBuffer> buffer = new GraphicBuffer( in android_graphics_GraphicBuffer_create()
173 sp<GraphicBuffer> buffer(wrapper->get()); in android_graphics_GraphicBuffer_lockCanvas()
257 sp<GraphicBuffer> buffer = new GraphicBuffer(); in android_graphics_GraphicBuffer_read()
269 sp<GraphicBuffer> graphicBufferForJavaObject(JNIEnv* env, jobject obj) { in graphicBufferForJavaObject()
274 sp<GraphicBuffer> buffer(wrapper->get()); in graphicBufferForJavaObject()
[all …]
/frameworks/base/libs/hwui/
DHardwareBitmapUploader.cpp74 sp<GraphicBuffer> graphicBuffer) { in uploadHardwareBitmap()
96 sp<GraphicBuffer> graphicBuffer) = 0;
168 sp<GraphicBuffer> graphicBuffer) override { in onUploadHardwareBitmap()
266 sp<GraphicBuffer> graphicBuffer) override { in onUploadHardwareBitmap()
288 sp<GraphicBuffer> buffer = new GraphicBuffer(1, 1, PIXEL_FORMAT_RGBA_FP16, in hasFP16Support()
289 GraphicBuffer::USAGE_HW_TEXTURE | in hasFP16Support()
290 GraphicBuffer::USAGE_SW_WRITE_NEVER | in hasFP16Support()
291 GraphicBuffer::USAGE_SW_READ_NEVER, in hasFP16Support()
388 sp<GraphicBuffer> buffer = new GraphicBuffer( in allocateHardwareBitmap()
391 GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_WRITE_NEVER | in allocateHardwareBitmap()
[all …]
/frameworks/native/libs/nativewindow/
DAHardwareBuffer.cpp49 sp<GraphicBuffer> gbuffer(new GraphicBuffer( in AHardwareBuffer_allocate()
56 GraphicBuffer::dumpAllocationsToSystemLog(); in AHardwareBuffer_allocate()
84 const GraphicBuffer* gbuffer = AHardwareBuffer_to_GraphicBuffer(buffer); in AHardwareBuffer_describe()
114 GraphicBuffer* gbuffer = AHardwareBuffer_to_GraphicBuffer(buffer); in AHardwareBuffer_lockAndGetInfo()
166 GraphicBuffer* gbuffer = AHardwareBuffer_to_GraphicBuffer(buffer); in AHardwareBuffer_lock()
195 GraphicBuffer* gBuffer = AHardwareBuffer_to_GraphicBuffer(buffer); in AHardwareBuffer_lockPlanes()
234 GraphicBuffer* gBuffer = AHardwareBuffer_to_GraphicBuffer(buffer); in AHardwareBuffer_unlock()
243 const GraphicBuffer* gBuffer = AHardwareBuffer_to_GraphicBuffer(buffer); in AHardwareBuffer_sendHandleToUnixSocket()
356 GraphicBuffer* gBuffer = new GraphicBuffer(); in AHardwareBuffer_recvHandleFromUnixSocket()
373 GraphicBuffer* gBuffer = new GraphicBuffer(); in AHardwareBuffer_isSupported()
[all …]
/frameworks/native/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/
DHwcBufferCache.h27 class GraphicBuffer; variable
48 void getHwcBuffer(int slot, const sp<GraphicBuffer>& buffer, uint32_t* outSlot,
49 sp<GraphicBuffer>* outBuffer);
55 wp<GraphicBuffer> mBuffers[BufferQueue::NUM_BUFFER_SLOTS];
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DAppWindowThumbnailTest.java25 import android.graphics.GraphicBuffer;
47 final GraphicBuffer buffer = GraphicBuffer.create(1, 1, PixelFormat.RGBA_8888, in buildThumbnail()
48 GraphicBuffer.USAGE_SW_READ_RARELY | GraphicBuffer.USAGE_SW_WRITE_NEVER); in buildThumbnail()
/frameworks/native/services/surfaceflinger/tests/unittests/
DCachingTest.cpp30 sp<GraphicBuffer> mBuffer1{new GraphicBuffer(1, 1, HAL_PIXEL_FORMAT_RGBA_8888, 1, 0)};
31 sp<GraphicBuffer> mBuffer2{new GraphicBuffer(1, 1, HAL_PIXEL_FORMAT_RGBA_8888, 1, 0)};
32 sp<GraphicBuffer> mBuffer3{new GraphicBuffer(10, 10, HAL_PIXEL_FORMAT_RGBA_8888, 1, 0)};
/frameworks/native/services/surfaceflinger/CompositionEngine/src/
DHwcBufferCache.cpp24 std::fill(std::begin(mBuffers), std::end(mBuffers), wp<GraphicBuffer>(nullptr)); in HwcBufferCache()
27 void HwcBufferCache::getHwcBuffer(int slot, const sp<GraphicBuffer>& buffer, uint32_t* outSlot, in getHwcBuffer()
28 sp<GraphicBuffer>* outBuffer) { in getHwcBuffer()
38 wp<GraphicBuffer> weakCopy(buffer); in getHwcBuffer()
/frameworks/native/libs/nativewindow/include-private/private/android/
DAHardwareBufferHelpers.h61 class GraphicBuffer; variable
62 const GraphicBuffer* AHardwareBuffer_to_GraphicBuffer(const AHardwareBuffer* buffer);
63 GraphicBuffer* AHardwareBuffer_to_GraphicBuffer(AHardwareBuffer* buffer);
68 AHardwareBuffer* AHardwareBuffer_from_GraphicBuffer(GraphicBuffer* buffer);
/frameworks/native/services/surfaceflinger/
DBufferLayerConsumer.h64 virtual bool reject(const sp<GraphicBuffer>& buf, const BufferItem& item) = 0;
160 sp<GraphicBuffer> getCurrentBuffer(int* outSlot = nullptr, sp<Fence>* outFence = nullptr) const;
205 sp<GraphicBuffer> graphicBuffer;
226 Image(const sp<GraphicBuffer>& graphicBuffer, renderengine::RenderEngine& engine);
228 const sp<GraphicBuffer>& graphicBuffer() { return mGraphicBuffer; } in graphicBuffer()
232 sp<GraphicBuffer> mGraphicBuffer;
269 static const uint64_t DEFAULT_USAGE_FLAGS = GraphicBuffer::USAGE_HW_TEXTURE;
/frameworks/base/libs/hwui/tests/common/scenes/
DHwBitmapInCompositeShader.cpp36 uint32_t usage = GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_READ_NEVER | in createContent()
39 sp<GraphicBuffer> buffer = new GraphicBuffer(400, 200, PIXEL_FORMAT_RGBA_8888, usage); in createContent()
42 buffer->lock(GraphicBuffer::USAGE_SW_WRITE_RARELY, ((void**)&pixels)); in createContent()
/frameworks/av/services/camera/libcameraservice/device3/
DCamera3StreamSplitter.h38 class GraphicBuffer; variable
79 status_t notifyBufferReleased(const sp<GraphicBuffer>& buffer);
170 BufferTracker(const sp<GraphicBuffer>& buffer,
174 const sp<GraphicBuffer>& getBuffer() const { return mBuffer; } in getBuffer()
191 sp<GraphicBuffer> mBuffer; // One instance that holds this native handle
219 const sp<GraphicBuffer>& gb);
264 typedef std::vector<sp<GraphicBuffer>> OutputSlots;
/frameworks/native/services/surfaceflinger/tests/unittests/mock/gui/
DMockGraphicBufferProducer.h33 MOCK_METHOD2(requestBuffer, status_t(int, sp<GraphicBuffer>*));
40 MOCK_METHOD2(detachNextBuffer, status_t(sp<GraphicBuffer>*, sp<Fence>*));
41 MOCK_METHOD2(attachBuffer, status_t(int*, const sp<GraphicBuffer>&));
55 MOCK_METHOD3(getLastQueuedBuffer, status_t(sp<GraphicBuffer>*, sp<Fence>*, float[16]));

1234567891011