Lines Matching refs:surface

104 jobject android_view_Surface_createFromSurface(JNIEnv* env, const sp<Surface>& surface) {
106 gSurfaceClassInfo.ctor, (jlong)surface.get());
115 surface->incStrong(&sRefBaseOwner);
125 sp<Surface> surface(new Surface(bufferProducer, true));
126 return android_view_Surface_createFromSurface(env, surface);
249 sp<Surface> surface(new Surface(producer, true));
250 if (surface == NULL) {
255 surface->incStrong(&sRefBaseOwner);
256 return jlong(surface.get());
298 sp<Surface> surface(reinterpret_cast<Surface *>(nativeObject));
300 if (!isSurfaceValid(surface)) {
317 status_t err = surface->lock(&outBuffer, dirtyRectPtr);
357 // Create another reference to the surface and return it. This reference
359 // because the latter could be replaced while the surface is locked.
360 sp<Surface> lockedSurface(surface);
367 sp<Surface> surface(reinterpret_cast<Surface *>(nativeObject));
368 if (!isSurfaceValid(surface)) {
372 // detach the canvas from the surface
376 // unlock surface
377 status_t err = surface->unlockAndPost();
385 sp<Surface> surface(reinterpret_cast<Surface *>(nativeObject));
386 if (!isSurfaceValid(surface)) {
390 surface->allocateBuffers();
398 sp<Surface> surface(ctrl->createSurface());
399 if (surface != NULL) {
400 surface->incStrong(&sRefBaseOwner);
402 return reinterpret_cast<jlong>(surface.get());
414 sp<Surface> surface(ctrl->getSurface());
415 if (surface != NULL) {
416 surface->incStrong(&sRefBaseOwner);
418 return reinterpret_cast<jlong>(surface.get());
480 Surface* surface = reinterpret_cast<Surface*>(nativeObject);
481 ANativeWindow* anw = static_cast<ANativeWindow*>(surface);
488 Surface* surface = reinterpret_cast<Surface*>(nativeObject);
489 ANativeWindow* anw = static_cast<ANativeWindow*>(surface);
496 Surface* surface = reinterpret_cast<Surface*>(nativeObject);
497 return surface->getNextFrameNumber();
501 Surface* surface = reinterpret_cast<Surface*>(nativeObject);
502 return surface->setScalingMode(scalingMode);
506 Surface* surface = reinterpret_cast<Surface*>(nativeObject);
507 return surface->disconnect(-1, IGraphicBufferProducer::DisconnectMode::AllLocal);
512 Surface* surface = reinterpret_cast<Surface*>(nativeObject);
517 int err = ((ANativeWindow*)surface)->perform(surface, NATIVE_WINDOW_API_CONNECT,
522 err = surface->attachBuffer(bp->getNativeBuffer());
526 err = ((ANativeWindow*)surface)->queueBuffer(surface, bp->getNativeBuffer(), -1);
530 err = surface->disconnect(NATIVE_WINDOW_API_CPU);
547 sp<Surface> surface(reinterpret_cast<Surface*>(surfacePtr));
552 proxy->initialize(surface);
562 sp<Surface> surface(reinterpret_cast<Surface*>(surfacePtr));
563 proxy->updateSurface(surface);