Home | History | Annotate | Download | only in surfaceflinger_client

Lines Matching full:surface

17 #define LOG_TAG "Surface"
38 #include <surfaceflinger/Surface.h>
107 const sp<ISurface>& surface,
110 : mClient(client), mSurface(surface),
138 // the surface's resource. Soon after this call, it will also release
263 sp<Surface> SurfaceControl::getSurface() const
267 mSurfaceData = new Surface(const_cast<SurfaceControl*>(this));
273 // Surface
323 Surface::Surface(const sp<SurfaceControl>& surface)
328 mSurface(surface->mSurface),
329 mIdentity(surface->mIdentity),
330 mFormat(surface->mFormat), mFlags(surface->mFlags),
331 mWidth(surface->mWidth), mHeight(surface->mHeight)
336 Surface::Surface(const Parcel& parcel, const sp<IBinder>& ref)
351 status_t Surface::writeToParcel(
352 const sp<Surface>& surface, Parcel* parcel)
360 if (Surface::isValid(surface)) {
361 sur = surface->mSurface;
362 identity = surface->mIdentity;
363 width = surface->mWidth;
364 height = surface->mHeight;
365 format = surface->mFormat;
366 flags = surface->mFlags;
379 Mutex Surface::sCachedSurfacesLock;
380 DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces;
382 sp<Surface> Surface::readFromParcel(const Parcel& data) {
385 sp<Surface> surface = sCachedSurfaces.valueFor(binder).promote();
386 if (surface == 0) {
387 surface = new Surface(data, binder);
388 sCachedSurfaces.add(binder, surface);
390 if (surface->mSurface == 0) {
391 surface = 0;
394 return surface;
397 // Remove the stale entries from the surface cache. This should only be called
399 void Surface::cleanCachedSurfacesLocked() {
401 wp<Surface> s(sCachedSurfaces.valueAt(i));
408 void Surface::init()
445 Surface::~Surface()
447 // this is a client-side operation, the surface is destroyed, unmap
464 bool Surface::isValid() {
468 status_t Surface::validate() const
476 // verify the identity of this surface
483 LOGE("[Surface] invalid operation (identity=%u)", mIdentity);
488 LOGE("[Surface] using an invalid surface, "
494 // check the surface didn't become invalid
497 LOGE("surface (identity=%u) is invalid, err=%d (%s)",
505 sp<ISurface> Surface::getISurface() const {
511 int Surface::setSwapInterval(ANativeWindow* window, int interval) {
515 int Surface::dequeueBuffer(ANativeWindow* window,
517 Surface* self = getSelf(window);
521 int Surface::cancelBuffer(ANativeWindow* window,
523 Surface* self = getSelf(window);
527 int Surface::lockBuffer(ANativeWindow* window,
529 Surface* self = getSelf(window);
533 int Surface::queueBuffer(ANativeWindow* window,
535 Surface* self = getSelf(window);
539 int Surface::query(ANativeWindow* window,
541 Surface* self = getSelf(window);
545 int Surface::perform(ANativeWindow* window,
549 Surface* self = getSelf(window);
557 bool Surface::needNewBuffer(int bufIdx,
573 int Surface::dequeueBuffer(android_native_buffer_t** buffer)
627 int Surface::cancelBuffer(android_native_buffer_t* buffer)
638 // other errors happen because the surface is now invalid,
654 int Surface::lockBuffer(android_native_buffer_t* buffer)
673 int Surface::queueBuffer(android_native_buffer_t* buffer)
700 int Surface::query(int what, int* value)
716 int Surface::perform(int operation, va_list args)
752 void Surface::dispatch_setUsage(va_list args) {
756 int Surface::dispatch_connect(va_list args) {
760 int Surface::dispatch_disconnect(va_list args) {
764 int Surface::dispatch_crop(va_list args) {
768 int Surface::dispatch_set_buffer_count(va_list args) {
772 int Surface::dispatch_set_buffers_geometry(va_list args) {
779 int Surface::dispatch_set_buffers_transform(va_list args) {
784 void Surface::setUsage(uint32_t reqUsage)
790 int Surface::connect(int api)
809 int Surface::disconnect(int api)
828 int Surface::crop(Rect const* rect)
840 int Surface::setBufferCount(int bufferCount)
846 sp<ISurface> surface;
848 return surface->setBufferCount(bufferCount);
851 SetBufferCountIPC(const sp<ISurface>& surface) : surface(surface) { }
860 int Surface::setBuffersGeometry(int w, int h, int format)
875 // we update the format of the surface as reported by query().
876 // this is to allow applications to change the format of a surface's
884 int Surface::setBuffersTransform(int transform)
893 int Surface::getConnectedApi() const
901 status_t Surface::lock(SurfaceInfo* info, bool blocking) {
902 return Surface::lock(info, NULL, blocking);
905 status_t Surface::lock(SurfaceInfo* other, Region* dirtyIn, bool blocking)
908 LOGE("Surface::lock(%p) failed. Already connected to another API",
917 LOGE("calling Surface::lock from different threads!");
927 LOGE("Surface::lock failed, already locked");
999 status_t Surface::unlockAndPost()
1002 LOGE("Surface::unlockAndPost failed, no locked buffer");
1018 void Surface::setSwapRectangle(const Rect& r) {
1023 int Surface::getBufferIndex(const sp<GraphicBuffer>& buffer) const
1028 status_t Surface::getBufferLocked(int index,
1049 "Surface (identity=%d) requestBuffer(%d, %u, %u, %u, %08x) "
1053 LOGE_IF(err, "Surface (identity=%d) state = %d", mIdentity, err);
1070 Surface::BufferInfo::BufferInfo()
1076 void Surface::BufferInfo::set(uint32_t w, uint32_t h, uint32_t format) {
1085 void Surface::BufferInfo::set(uint32_t usage) {
1089 void Surface::BufferInfo::get(uint32_t *pWidth, uint32_t *pHeight,
1097 bool Surface::BufferInfo::validateBuffer(const sp<GraphicBuffer>& buffer) const {