Home
last modified time | relevance | path

Searched refs:mSurface (Results 1 – 25 of 91) sorted by relevance

1234

/frameworks/native/services/surfaceflinger/CompositionEngine/tests/
DRenderSurfaceTest.cpp71 impl::RenderSurface mSurface{mCompositionEngine, mDisplay, member in android::compositionengine::__anond47b69f50111::RenderSurfaceTest
82 EXPECT_TRUE(mSurface.isValid()); in TEST_F()
95 mSurface.initialize(); in TEST_F()
105 EXPECT_EQ(expected, mSurface.getSize()); in TEST_F()
117 EXPECT_EQ(fence.get(), mSurface.getClientTargetAcquireFence().get()); in TEST_F()
127 mSurface.setDisplaySize(ui::Size(640, 480)); in TEST_F()
138 mSurface.setBufferDataspace(ui::Dataspace::DISPLAY_P3); in TEST_F()
146 EXPECT_FALSE(mSurface.isProtected()); in TEST_F()
150 mSurface.setProtected(true); in TEST_F()
151 EXPECT_TRUE(mSurface.isProtected()); in TEST_F()
[all …]
/frameworks/base/core/java/android/view/
DTextureView.java114 private SurfaceTexture mSurface; field in TextureView
255 if (mSurface != null) { in releaseSurfaceTexture()
259 shouldRelease = mListener.onSurfaceTextureDestroyed(mSurface); in releaseSurfaceTexture()
267 mSurface.release(); in releaseSurfaceTexture()
269 mSurface = null; in releaseSurfaceTexture()
373 if (mSurface != null) { in onSizeChanged()
374 mSurface.setDefaultBufferSize(getWidth(), getHeight()); in onSizeChanged()
377 mListener.onSurfaceTextureSizeChanged(mSurface, getWidth(), getHeight()); in onSizeChanged()
389 boolean createNewSurface = (mSurface == null); in getTextureLayer()
392 mSurface = new SurfaceTexture(false); in getTextureLayer()
[all …]
DSurfaceView.java113 final Surface mSurface = new Surface(); // Current surface in use field in SurfaceView
551 if (viewRoot == null || viewRoot.mSurface == null || !viewRoot.mSurface.isValid()) { in updateSurface()
557 mSurface.setCompatibilityTranslator(mTranslator); in updateSurface()
637 + "Cur surface: " + mSurface); in updateSurface()
710 if (mSurface.isValid()) { in updateSurface()
728 if (mSurface.isValid()) { in updateSurface()
729 mSurface.forceScopedDisconnect(); in updateSurface()
735 mSurface.copyFrom(mSurfaceControl); in updateSurface()
745 mSurface.createFrom(mSurfaceControl); in updateSurface()
748 if (visible && mSurface.isValid()) { in updateSurface()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskSnapshotSurfaceTest.java61 private TaskSnapshotSurface mSurface; field in TaskSnapshotSurfaceTest
71mSurface = new TaskSnapshotSurface(mWm, new Window(), new SurfaceControl(), snapshot, "Test", in setupSurface()
96 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 100, 200)); in fillEmptyBackground_fillHorizontally()
106 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 200, 100)); in fillEmptyBackground_fillVertically()
116 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 100, 100)); in fillEmptyBackground_fillBoth()
127 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 100, 100)); in fillEmptyBackground_dontFill_sameSize()
137 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 200, 200)); in fillEmptyBackground_dontFill_bitmapLarger()
144 assertEquals(new Rect(0, 0, 100, 90), mSurface.calculateSnapshotCrop()); in testCalculateSnapshotCrop()
150 assertEquals(new Rect(0, 10, 100, 90), mSurface.calculateSnapshotCrop()); in testCalculateSnapshotCrop_taskNotOnTop()
156 assertEquals(new Rect(10, 0, 100, 100), mSurface.calculateSnapshotCrop()); in testCalculateSnapshotCrop_navBarLeft()
[all …]
/frameworks/base/tests/SurfaceComposition/src/android/surfacecomposition/
DCustomSurfaceView.java42 private Surface mSurface; field in CustomSurfaceView
106 if (mSurface != null) { in acquireCanvas()
107 mCanvas = mSurface.lockCanvas(null); in acquireCanvas()
115 if (mSurface == null) { in releaseCanvas()
119 mSurface.unlockCanvasAndPost(mCanvas); in releaseCanvas()
130 if (mSurface != null) { in invalidateSurface()
131 Canvas canvas = mSurface.lockCanvas(null); in invalidateSurface()
146 mSurface.unlockCanvasAndPost(canvas); in invalidateSurface()
157 if (mSurface == null) { in waitForSurfaceReady()
164 if (mSurface == null) in waitForSurfaceReady()
[all …]
/frameworks/base/tests/GamePerformance/src/android/gameperformance/
DCustomSurfaceView.java45 private Surface mSurface; field in CustomSurfaceView
52 if (mSurface == null) {
101 if (mSurface == null) { in invalidateSurface()
107 Canvas canvas = mSurface.lockHardwareCanvas(); in invalidateSurface()
124 mSurface.unlockCanvasAndPost(canvas); in invalidateSurface()
139 if (mSurface == null) { in waitForSurfaceReady()
146 if (mSurface == null) in waitForSurfaceReady()
156 if (mSurface != null) { in waitForSurfaceDestroyed()
162 if (mSurface != null) in waitForSurfaceDestroyed()
176 mSurface = holder.getSurface(); in surfaceChanged()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DLetterbox.java229 private SurfaceControl mSurface; field in Letterbox.LetterboxSurface
248 mSurface = mFactory.get().setName("Letterbox - " + mType) in createSurface()
250 mSurface.setLayer(-1); in createSurface()
251 mSurface.setColor(new float[]{0, 0, 0}); in createSurface()
252 mSurface.setColorSpaceAgnostic(true); in createSurface()
263 if (mSurface != null) { in remove()
264 mSurface.remove(); in remove()
265 mSurface = null; in remove()
299 if (mSurface == null) { in applySurfaceChanges()
302 t.setPosition(mSurface, mSurfaceFrameRelative.left, mSurfaceFrameRelative.top); in applySurfaceChanges()
[all …]
DStrictModeFlash.java34 private final Surface mSurface = new Surface(); field in StrictModeFlash
51 mSurface.copyFrom(ctrl); in StrictModeFlash()
69 c = mSurface.lockCanvas(dirty); in drawIfNeeded()
98 mSurface.unlockCanvasAndPost(c); in drawIfNeeded()
DEmulatorDisplayOverlay.java42 private final Surface mSurface = new Surface(); field in EmulatorDisplayOverlay
66 mSurface.copyFrom(ctrl); in EmulatorDisplayOverlay()
84 c = mSurface.lockCanvas(dirty); in drawIfNeeded()
97 mSurface.unlockCanvasAndPost(c); in drawIfNeeded()
DCircularDisplayMask.java46 private final Surface mSurface = new Surface(); field in CircularDisplayMask
80 mSurface.copyFrom(ctrl); in CircularDisplayMask()
101 c = mSurface.lockCanvas(dirty); in drawIfNeeded()
129 mSurface.unlockCanvasAndPost(c); in drawIfNeeded()
/frameworks/base/core/java/android/hardware/display/
DVirtualDisplay.java38 private Surface mSurface; field in VirtualDisplay
45 mSurface = surface; in VirtualDisplay()
59 return mSurface; in getSurface()
75 if (mSurface != surface) { in setSurface()
77 mSurface = surface; in setSurface()
122 + ", surface=" + mSurface + "}"; in toString()
/frameworks/base/libs/hwui/renderthread/
DReliableSurface.h34 void setDequeueTimeout(nsecs_t timeout) { mSurface->setDequeueTimeout(timeout); } in setDequeueTimeout()
38 void allocateBuffers() { mSurface->allocateBuffers(); } in allocateBuffers()
40 int query(int what, int* value) const { return mSurface->query(what, value); } in query()
42 nsecs_t getLastDequeueStartTime() const { return mSurface->getLastDequeueStartTime(); } in getLastDequeueStartTime()
44 uint64_t getNextFrameNumber() const { return mSurface->getNextFrameNumber(); } in getNextFrameNumber()
47 const sp<Surface> mSurface;
DReliableSurface.cpp48 ReliableSurface::ReliableSurface(sp<Surface>&& surface) : mSurface(std::move(surface)) { in ReliableSurface()
49 LOG_ALWAYS_FATAL_IF(!mSurface, "Error, unable to wrap a nullptr"); in ReliableSurface()
114 int result = callProtected(mSurface, dequeueBuffer, &buffer, &fenceFd); in reserveNext()
141 callProtected(mSurface, cancelBuffer, buffer, releaseFd); in clearReservedBuffer()
153 int result = callProtected(mSurface, cancelBuffer, buffer, fenceFd); in cancelBuffer()
168 int result = callProtected(mSurface, dequeueBuffer, buffer, fenceFd); in dequeueBuffer()
191 int result = callProtected(mSurface, queueBuffer, buffer, fenceFd); in queueBuffer()
232 return getSelf(window)->mSurface.get(); in getWrapped()
/frameworks/base/libs/hwui/pipeline/skia/
DVectorDrawableAtlas.cpp37 if (!mSurface) { in prepareForDraw()
38 mSurface = createSurface(mWidth, mHeight, context); in prepareForDraw()
65 if (isFragmented() && mSurface) { in repackIfNeeded()
89 if (!mSurface) { in repack()
96 if (mSurface) { in repack()
97 sourceImageAtlas = mSurface->makeImageSnapshot().get(); in repack()
148 mSurface = newSurface; in repack()
158 if (mSurface) { in requestNewEntry()
168 result.surface = mSurface; in requestNewEntry()
183 result.surface = mSurface; in requestNewEntry()
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DCanvasTextureViewActivity.java72 private final TextureView mSurface; field in CanvasTextureViewActivity.RenderingThread
76 mSurface = surface; in RenderingThread()
90 final Canvas canvas = mSurface.lockCanvas(null); in run()
95 mSurface.unlockCanvasAndPost(canvas); in run()
98 if (x + 20.0f + speedX >= mSurface.getWidth() || x + speedX <= 0.0f) { in run()
101 if (y + 20.0f + speedY >= mSurface.getHeight() || y + speedY <= 0.0f) { in run()
DHardwareCanvasTextureViewActivity.java74 private final Surface mSurface; field in HardwareCanvasTextureViewActivity.RenderingThread
79 mSurface = new Surface(mView.getSurfaceTexture()); in RenderingThread()
93 final Canvas canvas = mSurface.lockHardwareCanvas(); in run()
98 mSurface.unlockCanvasAndPost(canvas); in run()
/frameworks/native/services/surfaceflinger/
DNativeWindowSurface.cpp33 : mSurface(new Surface(producer, /* controlledByApp */ false)) {} in createNativeWindowSurface()
37 sp<ANativeWindow> getNativeWindow() const override { return mSurface; } in createNativeWindowSurface()
39 void preallocateBuffers() override { mSurface->allocateBuffers(); } in createNativeWindowSurface()
42 sp<Surface> mSurface; in createNativeWindowSurface() member in android::surfaceflinger::impl::createNativeWindowSurface::NativeWindowSurface
/frameworks/native/cmds/flatland/
DMain.cpp288 mSurface(EGL_NO_SURFACE) { in Layer()
298 &mGLConsumer, &mSurface, &mTexName); in setUp()
331 if (mSurface != EGL_NO_SURFACE) { in tearDown()
332 mGLHelper->destroySurface(&mSurface); in tearDown()
340 return mRenderer->render(mSurface); in render()
366 EGLSurface mSurface; member in Layer
381 mSurface(EGL_NO_SURFACE), in BenchmarkRunner()
402 result = mGLHelper->createSurfaceTexture(w, h, &mGLConsumer, &mSurface, in setUp()
450 mGLHelper->destroySurface(&mSurface); in tearDown()
469 result = doFrame(mSurface); in run()
[all …]
/frameworks/rs/tests/java_api/LivePreview/src/com/android/rs/livepreview/
DRsYuv.java48 private Surface mSurface; field in RsYuv
59 mAllocationOut.setSurface(mSurface); in setupSurface()
61 if (mSurface != null) { in setupSurface()
129 mSurface = new Surface(surface); in onSurfaceTextureAvailable()
136 mSurface = new Surface(surface); in onSurfaceTextureSizeChanged()
143 mSurface = null; in onSurfaceTextureDestroyed()
/frameworks/native/libs/gui/tests/
DMultiTextureConsumer_test.cpp42 mSurface = new Surface(producer); in SetUp()
43 mANW = mSurface.get(); in SetUp()
64 sp<Surface> mSurface; member in android::MultiTextureConsumerTest
108 mSurface->lock(&buffer, nullptr); in TEST_F()
110 mSurface->unlockAndPost(); in TEST_F()
/frameworks/base/libs/hwui/tests/common/
DTestContext.cpp67 if (!mSurface.get()) { in surface()
70 return mSurface; in surface()
87 mSurface = mSurfaceControl->getSurface(); in createWindowSurface()
98 mSurface = new Surface(producer); in createOffscreenSurface()
/frameworks/base/services/core/jni/
Dcom_android_server_tv_TvInputHal.cpp105 sp<Surface> mSurface; member in android::BufferProducerThread
136 sp<ANativeWindow> anw(mSurface); in readyToRun()
159 if (surface == mSurface) { in setSurfaceLocked()
176 mSurface = surface; in setSurfaceLocked()
208 if (mSurface == NULL) { in threadLoop()
217 sp<ANativeWindow> anw(mSurface); in threadLoop()
273 sp<Surface> mSurface; member in android::JTvInputHal::Connection
346 if (connection.mSurface == surface) { in addOrUpdateStream()
351 if (connection.mSurface != NULL) { in addOrUpdateStream()
353 if (Surface::isValid(connection.mSurface)) { in addOrUpdateStream()
[all …]
/frameworks/base/core/java/com/android/internal/view/
DBaseSurfaceHolder.java40 public Surface mSurface = new Surface(); field in BaseSurfaceHolder
192 c = mSurface.lockHardwareCanvas(); in internalLockCanvas()
194 c = mSurface.lockCanvas(dirty); in internalLockCanvas()
226 mSurface.unlockCanvasAndPost(canvas); in unlockCanvasAndPost()
231 return mSurface; in getSurface()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DRenderTarget.java67 private EGLSurface mSurface; field in RenderTarget
195 if (currentSurface != null && !currentSurface.equals(mSurface)) { in registerAsDisplaySurface()
198 mDisplaySurfaces.put(mContext, mSurface); in registerAsDisplaySurface()
253 if (removeReferenceTo(mSurface)) { in release()
254 mEgl.eglDestroySurface(mDisplay, mSurface); in release()
255 mSurface = EGL10.EGL_NO_SURFACE; in release()
291 return "RenderTarget(" + mDisplay + ", " + mContext + ", " + mSurface + ", " + mFbo + ")"; in toString()
353 mSurface = surface; in RenderTarget()
361 return mSurface; in surface()
364 return displaySurface != null ? displaySurface : mSurface; in surface()
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/views/
DBlockingGLTextureView.java318 private SurfaceTexture mSurface; field in BlockingGLTextureView.RenderThread
338 if (mSurface == null) { in checkSurface()
349 mSurface = surface; in setSurface()
363 if (mSurface != null) { in render()
365 mSurface.updateTexImage(); in render()
370 mSurface = null; in finish()
398 if (mEglHelper.createSurface(mSurface)) { in handleMessageLocked()

1234