Home
last modified time | relevance | path

Searched refs:surface (Results 1 – 25 of 518) sorted by relevance

12345678910>>...21

/frameworks/base/core/java/android/hardware/camera2/utils/
DSurfaceUtils.java57 public static boolean isSurfaceForPreview(Surface surface) { in isSurfaceForPreview() argument
58 checkNotNull(surface); in isSurfaceForPreview()
59 long usageFlags = nativeDetectSurfaceUsageFlags(surface); in isSurfaceForPreview()
66 int surfaceFormat = getSurfaceFormat(surface); in isSurfaceForPreview()
78 public static boolean isSurfaceForHwVideoEncoder(Surface surface) { in isSurfaceForHwVideoEncoder() argument
79 checkNotNull(surface); in isSurfaceForHwVideoEncoder()
80 long usageFlags = nativeDetectSurfaceUsageFlags(surface); in isSurfaceForHwVideoEncoder()
87 int surfaceFormat = getSurfaceFormat(surface); in isSurfaceForHwVideoEncoder()
98 public static long getSurfaceId(Surface surface) { in getSurfaceId() argument
99 checkNotNull(surface); in getSurfaceId()
[all …]
/frameworks/native/libs/gui/tests/
DEndToEndNativeInputTest.cpp456 std::unique_ptr<InputSurface> surface = makeSurface(100, 100); in TEST_F() local
457 surface->showAt(100, 100); in TEST_F()
461 EXPECT_NE(surface->consumeEvent(), nullptr); in TEST_F()
471 std::unique_ptr<InputSurface> surface = makeSurface(100, 100); in TEST_F() local
472 surface->showAt(100, 100); in TEST_F()
481 surface->expectTap(1, 1); in TEST_F()
484 surface->doTransaction([](auto& t, auto& sc) { t.setPosition(sc, 200, 200); }); in TEST_F()
490 surface->expectTap(1, 1); in TEST_F()
494 std::unique_ptr<InputSurface> surface = makeSurface(100, 100); in TEST_F() local
497 surface->showAt(10, 10); in TEST_F()
[all …]
DMalicious.cpp152 sp<Surface> surface = new Surface(malicious); in TEST() local
155 ASSERT_EQ(NO_ERROR, surface->lock(&buffer, nullptr)); in TEST()
156 ASSERT_EQ(NO_ERROR, surface->unlockAndPost()); in TEST()
160 ASSERT_EQ(FAILED_TRANSACTION, surface->lock(&buffer, nullptr)); in TEST()
165 sp<Surface> surface = new Surface(malicious); in TEST() local
168 ASSERT_EQ(NO_ERROR, surface->lock(&buffer, nullptr)); in TEST()
169 ASSERT_EQ(NO_ERROR, surface->unlockAndPost()); in TEST()
173 ASSERT_EQ(FAILED_TRANSACTION, surface->lock(&buffer, nullptr)); in TEST()
178 sp<Surface> surface = new Surface(malicious); in TEST() local
181 ASSERT_EQ(NO_ERROR, surface->lock(&buffer, nullptr)); in TEST()
[all …]
/frameworks/base/core/jni/
Dandroid_view_Surface.cpp120 jobject android_view_Surface_createFromSurface(JNIEnv* env, const sp<Surface>& surface) { in android_view_Surface_createFromSurface() argument
122 gSurfaceClassInfo.ctor, (jlong)surface.get()); in android_view_Surface_createFromSurface()
131 surface->incStrong(&sRefBaseOwner); in android_view_Surface_createFromSurface()
141 sp<Surface> surface(new Surface(bufferProducer, true)); in android_view_Surface_createFromIGraphicBufferProducer() local
142 return android_view_Surface_createFromSurface(env, surface); in android_view_Surface_createFromIGraphicBufferProducer()
163 sp<Surface> surface(new Surface(producer, true)); in nativeCreateFromSurfaceTexture() local
164 if (surface == NULL) { in nativeCreateFromSurfaceTexture()
169 surface->incStrong(&sRefBaseOwner); in nativeCreateFromSurfaceTexture()
170 return jlong(surface.get()); in nativeCreateFromSurfaceTexture()
198 sp<Surface> surface(reinterpret_cast<Surface *>(nativeObject)); in nativeLockCanvas() local
[all …]
Dandroid_hardware_camera2_utils_SurfaceUtils.cpp53 static sp<ANativeWindow> getNativeWindow(JNIEnv* env, jobject surface) { in getNativeWindow() argument
55 if (surface) { in getNativeWindow()
56 anw = android_view_Surface_getNativeWindow(env, surface); in getNativeWindow()
71 static sp<Surface> getSurface(JNIEnv* env, jobject surface) { in getSurface() argument
73 if (surface) { in getSurface()
74 s = android_view_Surface_getSurface(env, surface); in getSurface()
92 static jint SurfaceUtils_nativeDetectSurfaceType(JNIEnv* env, jobject thiz, jobject surface) { in SurfaceUtils_nativeDetectSurfaceType() argument
95 if ((anw = getNativeWindow(env, surface)) == NULL) { in SurfaceUtils_nativeDetectSurfaceType()
110 static jint SurfaceUtils_nativeDetectSurfaceDataspace(JNIEnv* env, jobject thiz, jobject surface) { in SurfaceUtils_nativeDetectSurfaceDataspace() argument
113 if ((anw = getNativeWindow(env, surface)) == NULL) { in SurfaceUtils_nativeDetectSurfaceDataspace()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DSkiaPipelineTests.cpp57 auto surface = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(1, 1)); in RENDERTHREAD_TEST() local
58 surface->getCanvas()->drawColor(SK_ColorBLUE, SkBlendMode::kSrcOver); in RENDERTHREAD_TEST()
59 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_TEST()
60 pipeline->renderFrame(layerUpdateQueue, dirty, renderNodes, opaque, contentDrawBounds, surface, in RENDERTHREAD_TEST()
62 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorRED); in RENDERTHREAD_TEST()
79 auto surface = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(2, 2)); in RENDERTHREAD_TEST() local
80 surface->getCanvas()->drawColor(SK_ColorBLUE, SkBlendMode::kSrcOver); in RENDERTHREAD_TEST()
81 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_TEST()
82 pipeline->renderFrame(layerUpdateQueue, dirty, renderNodes, true, contentDrawBounds, surface, in RENDERTHREAD_TEST()
84 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_TEST()
[all …]
/frameworks/base/core/java/android/view/
DSyncRtSurfaceTransactionApplier.java89 SurfaceControl surface = surfaceParams.surface; in applyParams() local
108 t.setMatrix(params.surface, params.matrix, tmpFloat9); in applyParams()
111 t.setWindowCrop(params.surface, params.windowCrop); in applyParams()
114 t.setAlpha(params.surface, params.alpha); in applyParams()
117 t.setLayer(params.surface, params.layer); in applyParams()
120 t.setCornerRadius(params.surface, params.cornerRadius); in applyParams()
123 t.setBackgroundBlurRadius(params.surface, params.backgroundBlurRadius); in applyParams()
127 t.show(params.surface); in applyParams()
129 t.hide(params.surface); in applyParams()
166 final SurfaceControl surface; field in SyncRtSurfaceTransactionApplier.SurfaceParams.Builder
[all …]
/frameworks/native/opengl/tests/gl2_basic/
Dgl2_basic.cpp270 void setSurfaceMetadata(EGLDisplay dpy, EGLSurface surface) { in setSurfaceMetadata() argument
273 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT, METADATA_SCALE(0.640)); in setSurfaceMetadata()
274 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT, METADATA_SCALE(0.330)); in setSurfaceMetadata()
275 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT, METADATA_SCALE(0.290)); in setSurfaceMetadata()
276 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT, METADATA_SCALE(0.600)); in setSurfaceMetadata()
277 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT, METADATA_SCALE(0.150)); in setSurfaceMetadata()
278 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT, METADATA_SCALE(0.060)); in setSurfaceMetadata()
279 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_WHITE_POINT_X_EXT, METADATA_SCALE(0.3127)); in setSurfaceMetadata()
280 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_WHITE_POINT_Y_EXT, METADATA_SCALE(0.3290)); in setSurfaceMetadata()
282 eglSurfaceAttrib(dpy, surface, EGL_SMPTE2086_MAX_LUMINANCE_EXT, METADATA_SCALE(350)); in setSurfaceMetadata()
[all …]
/frameworks/native/libs/renderengine/skia/debug/
DSkiaCapture.cpp50 SkCanvas* SkiaCapture::tryCapture(SkSurface* surface) NO_THREAD_SAFETY_ANALYSIS { in tryCapture() argument
60 return surface->getCanvas(); in tryCapture()
78 mCurrentPageCanvas = mMultiPic->beginPage(surface->width(), surface->height()); in tryCapture()
81 mNwayCanvas = std::make_unique<SkNWayCanvas>(surface->width(), surface->height()); in tryCapture()
82 mNwayCanvas->addCanvas(surface->getCanvas()); in tryCapture()
104 SkCanvas* SkiaCapture::tryOffscreenCapture(SkSurface* surface, OffscreenState* state) { in tryOffscreenCapture() argument
108 return surface->getCanvas(); in tryOffscreenCapture()
114 state->offscreenRecorder->beginRecording(surface->width(), surface->height()); in tryOffscreenCapture()
117 state->offscreenCanvas = std::make_unique<SkNWayCanvas>(surface->width(), surface->height()); in tryOffscreenCapture()
118 state->offscreenCanvas->addCanvas(surface->getCanvas()); in tryOffscreenCapture()
/frameworks/native/opengl/tests/gl_perf/
Dgl2_perf.cpp50 static EGLSurface surface; variable
92 surface = eglCreateWindowSurface(dpy, myConfig, window, NULL); in main()
94 if (surface == EGL_NO_SURFACE) { in main()
105 returnValue = eglMakeCurrent(dpy, surface, surface, context); in main()
110 eglQuerySurface(dpy, surface, EGL_WIDTH, &w); in main()
112 eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); in main()
119 eglSwapBuffers(dpy, surface); in main()
127 eglSwapBuffers(dpy, surface); in ptSwap()
/frameworks/native/opengl/tests/swapinterval/
Dswapinterval.cpp43 EGLSurface surface; in main() local
71 surface = eglCreateWindowSurface(dpy, config, window, NULL); in main()
72 if (surface == EGL_NO_SURFACE) { in main()
84 eglMakeCurrent(dpy, surface, surface, context); in main()
85 eglQuerySurface(dpy, surface, EGL_WIDTH, &w); in main()
86 eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); in main()
100 eglSwapBuffers(dpy, surface); in main()
112 eglSwapBuffers(dpy, surface); in main()
115 eglSwapBuffers(dpy, surface); in main()
/frameworks/base/libs/hwui/renderthread/
DEglManager.cpp38 EGLAPI void EGLAPIENTRY eglBeginFrame(EGLDisplay dpy, EGLSurface surface);
500 EGLSurface surface = eglCreateWindowSurface(mEglDisplay, config, window, attribs); in createSurface() local
501 if (surface == EGL_NO_SURFACE) { in createSurface()
506 LOG_ALWAYS_FATAL_IF(eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, in createSurface()
520 return surface; in createSurface()
523 void EglManager::destroySurface(EGLSurface surface) { in destroySurface() argument
524 if (isCurrent(surface)) { in destroySurface()
527 if (!eglDestroySurface(mEglDisplay, surface)) { in destroySurface()
528 ALOGW("Failed to destroy surface %p, error=%s", (void*)surface, eglErrorString()); in destroySurface()
549 bool EglManager::makeCurrent(EGLSurface surface, EGLint* errOut, bool force) { in makeCurrent() argument
[all …]
DEglManager.h53 void destroySurface(EGLSurface surface);
57 bool isCurrent(EGLSurface surface) { return mCurrentSurface == surface; } in isCurrent() argument
59 bool makeCurrent(EGLSurface surface, EGLint* errOut = nullptr, bool force = false);
60 Frame beginFrame(EGLSurface surface);
69 bool setPreserveBuffer(EGLSurface surface, bool preserve);
99 EGLint queryBufferAge(EGLSurface surface);
/frameworks/native/opengl/tests/finish/
Dfinish.cpp45 EGLSurface surface; in main() local
62 surface = eglCreateWindowSurface(dpy, config, window, NULL); in main()
64 eglMakeCurrent(dpy, surface, surface, context); in main()
65 eglQuerySurface(dpy, surface, EGL_WIDTH, &w); in main()
66 eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); in main()
113 eglSwapBuffers(dpy, surface); in main()
127 eglSwapBuffers(dpy, surface); in main()
142 eglSwapBuffers(dpy, surface); in main()
157 eglSwapBuffers(dpy, surface); in main()
174 eglSwapBuffers(dpy, surface); in main()
[all …]
/frameworks/base/rs/java/android/renderscript/
DRSTextureView.java69 public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { in onSurfaceTextureAvailable() argument
71 mSurfaceTexture = surface; in onSurfaceTextureAvailable()
82 public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) { in onSurfaceTextureSizeChanged() argument
84 mSurfaceTexture = surface; in onSurfaceTextureSizeChanged()
95 public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) { in onSurfaceTextureDestroyed() argument
97 mSurfaceTexture = surface; in onSurfaceTextureDestroyed()
110 public void onSurfaceTextureUpdated(SurfaceTexture surface) { in onSurfaceTextureUpdated() argument
112 mSurfaceTexture = surface; in onSurfaceTextureUpdated()
/frameworks/base/packages/SystemUI/src/com/android/systemui/touch/
DTouchInsetManager.java112 final AttachedSurfaceControl surface = view.getRootSurfaceControl(); in updateTouchRegions()
115 if (surface == null) { in updateTouchRegions()
119 if (!affectedSurfaces.containsKey(surface)) { in updateTouchRegions()
120 affectedSurfaces.put(surface, Region.obtain()); in updateTouchRegions()
126 affectedSurfaces.get(surface).op(boundaries, Region.Op.UNION); in updateTouchRegions()
181 final AttachedSurfaceControl surface = entry.getKey(); in updateTouchInsets()
183 if (!affectedSurfaces.containsKey(surface)) { in updateTouchInsets()
184 affectedSurfaces.put(surface, Region.obtain()); in updateTouchInsets()
187 affectedSurfaces.get(surface).op(entry.getValue(), Region.Op.UNION); in updateTouchInsets()
196 final AttachedSurfaceControl surface = entry.getKey(); in updateTouchInsets()
[all …]
/frameworks/base/core/java/android/hardware/camera2/extension/
DExtensionOutputConfiguration.java70 @NonNull CameraOutputSurface surface) { in initializeOutputConfig() argument
71 config.surface = surface.getSurface(); in initializeOutputConfig()
72 if (surface.getSize() != null) { in initializeOutputConfig()
74 config.size.width = surface.getSize().getWidth(); in initializeOutputConfig()
75 config.size.height = surface.getSize().getHeight(); in initializeOutputConfig()
77 config.imageFormat = surface.getImageFormat(); in initializeOutputConfig()
84 config.dynamicRangeProfile = surface.getDynamicRangeProfile(); in initializeOutputConfig()
/frameworks/base/services/core/java/com/android/server/wm/
DBlackFrame.java38 final SurfaceControl surface; field in BlackFrame.BlackSurface
49 surface = dc.makeOverlay() in BlackSurface()
55 transaction.setWindowCrop(surface, w, h); in BlackSurface()
56 transaction.setAlpha(surface, 1); in BlackSurface()
57 transaction.setLayer(surface, layer); in BlackSurface()
58 transaction.setPosition(surface, left, top); in BlackSurface()
59 transaction.show(surface); in BlackSurface()
61 " BLACK %s: CREATE layer=%d", surface, layer); in BlackSurface()
78 pw.print(": "); pw.print(bs.surface); in printTo()
126 ProtoLog.i(WM_SHOW_SURFACE_ALLOC, " BLACK %s: DESTROY", mBlackSurfaces[i].surface); in kill()
[all …]
/frameworks/native/opengl/tests/filter/
Dfilter.cpp37 EGLSurface surface; in main() local
54 surface = eglCreateWindowSurface(dpy, config, window, NULL); in main()
59 surface = eglCreatePbufferSurface(dpy, config, attribs); in main()
60 if (surface == EGL_NO_SURFACE) { in main()
65 eglMakeCurrent(dpy, surface, surface, context); in main()
66 eglQuerySurface(dpy, surface, EGL_WIDTH, &w); in main()
67 eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); in main()
161 eglSwapBuffers(dpy, surface); in main()
187 eglSwapBuffers(dpy, surface); in main()
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/
DGLEnvironment.java106 public int registerSurface(Surface surface) { in registerSurface() argument
107 int result = nativeAddSurface(surface); in registerSurface()
109 throw new RuntimeException("Error registering surface " + surface + "!"); in registerSurface()
115 Surface surface = new Surface(surfaceTexture); in registerSurfaceTexture() local
116 int result = nativeAddSurfaceWidthHeight(surface, width, height); in registerSurfaceTexture()
117 surface.release(); in registerSurfaceTexture()
179 private native int nativeAddSurface(Surface surface); in nativeAddSurface() argument
181 private native int nativeAddSurfaceWidthHeight(Surface surface, int width, int height); in nativeAddSurfaceWidthHeight() argument
/frameworks/native/opengl/libs/EGL/
DeglApi.cpp145 EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { in eglDestroySurface() argument
149 return cnx->platform.eglDestroySurface(dpy, surface); in eglDestroySurface()
152 EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value) { in eglQuerySurface() argument
156 return cnx->platform.eglQuerySurface(dpy, surface, attribute, value); in eglQuerySurface()
159 void EGLAPI eglBeginFrame(EGLDisplay dpy, EGLSurface surface) { in eglBeginFrame() argument
164 cnx->platform.eglBeginFrame(dpy, surface); in eglBeginFrame()
260 EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { in eglSwapBuffers() argument
265 return cnx->platform.eglSwapBuffers(dpy, surface); in eglSwapBuffers()
268 EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, NativePixmapType target) { in eglCopyBuffers() argument
272 return cnx->platform.eglCopyBuffers(dpy, surface, target); in eglCopyBuffers()
[all …]
/frameworks/base/core/java/android/hardware/display/
DVirtualDisplay.java40 Surface surface) { in VirtualDisplay() argument
44 mSurface = surface; in VirtualDisplay()
80 public void setSurface(Surface surface) { in setSurface() argument
81 if (mSurface != surface) { in setSurface()
82 mGlobal.setVirtualDisplaySurface(mToken, surface); in setSurface()
83 mSurface = surface; in setSurface()
/frameworks/base/tests/SurfaceViewBufferTests/cpp/
DSurfaceProxy.cpp41 android::sp<android::Surface> surface = static_cast<android::Surface*>(sAnw); in Java_com_android_test_SurfaceProxy_setSurface() local
42 surface->enableFrameTimestamps(true); in Java_com_android_test_SurfaceProxy_setSurface()
43 surface->connect(NATIVE_WINDOW_API_CPU, nullptr, false); in Java_com_android_test_SurfaceProxy_setSurface()
53 android::sp<android::Surface> surface = static_cast<android::Surface*>(sAnw); in Java_com_android_test_SurfaceProxy_waitUntilBufferDisplayed() local
64 surface->getFrameTimestamps(frameNumber, &outRequestedPresentTime, &outAcquireTime, in Java_com_android_test_SurfaceProxy_waitUntilBufferDisplayed()
117 android::sp<android::Surface> surface = static_cast<android::Surface*>(sAnw); in Java_com_android_test_SurfaceProxy_SurfaceSetScalingMode() local
118 return surface->setScalingMode(scalingMode); in Java_com_android_test_SurfaceProxy_SurfaceSetScalingMode()
207 android::sp<android::Surface> surface = static_cast<android::Surface*>(sAnw); in Java_com_android_test_SurfaceProxy_SurfaceSetAsyncMode() local
208 return surface->setAsyncMode(async); in Java_com_android_test_SurfaceProxy_SurfaceSetAsyncMode()
214 android::sp<android::Surface> surface = static_cast<android::Surface*>(sAnw); in Java_com_android_test_SurfaceProxy_SurfaceSetDequeueTimeout() local
[all …]
/frameworks/native/opengl/tests/fillrate/
Dfillrate.cpp44 EGLSurface surface; in main() local
61 surface = eglCreateWindowSurface(dpy, config, window, NULL); in main()
63 eglMakeCurrent(dpy, surface, surface, context); in main()
64 eglQuerySurface(dpy, surface, EGL_WIDTH, &w); in main()
65 eglQuerySurface(dpy, surface, EGL_HEIGHT, &h); in main()
127 eglSwapBuffers(dpy, surface); in main()
137 eglSwapBuffers(dpy, surface); in main()
149 eglSwapBuffers(dpy, surface); in main()
/frameworks/native/cmds/flatland/
DGLHelper.cpp136 bool GLHelper::makeCurrent(EGLSurface surface) { in makeCurrent() argument
139 result = eglMakeCurrent(mDisplay, surface, surface, mContext); in makeCurrent()
146 eglQuerySurface(mDisplay, surface, EGL_WIDTH, &w); in makeCurrent()
147 eglQuerySurface(mDisplay, surface, EGL_HEIGHT, &h); in makeCurrent()
154 sp<GLConsumer>* glConsumer, EGLSurface* surface, in createSurfaceTexture() argument
167 return createNamedSurfaceTexture(*name, w, h, glConsumer, surface); in createSurfaceTexture()
170 void GLHelper::destroySurface(EGLSurface* surface) { in destroySurface() argument
171 if (eglGetCurrentSurface(EGL_READ) == *surface || in destroySurface()
172 eglGetCurrentSurface(EGL_DRAW) == *surface) { in destroySurface()
176 eglDestroySurface(mDisplay, *surface); in destroySurface()
[all …]

12345678910>>...21