Home
last modified time | relevance | path

Searched refs:mCanvas (Results 1 – 25 of 32) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/widget/
DTextViewPerformanceTest.java40 private Canvas mCanvas; field in TextViewPerformanceTest
48 mCanvas = new Canvas(mBitmap); in setUp()
59 mLabelView.myDraw(mCanvas); in setUp()
62 mCanvas.save(); in setUp()
73 mTextView.myDraw(mCanvas); in testDrawTextViewLine()
74 mTextView.myDraw(mCanvas); in testDrawTextViewLine()
75 mTextView.myDraw(mCanvas); in testDrawTextViewLine()
76 mTextView.myDraw(mCanvas); in testDrawTextViewLine()
77 mTextView.myDraw(mCanvas); in testDrawTextViewLine()
78 mTextView.myDraw(mCanvas); in testDrawTextViewLine()
[all …]
/frameworks/base/libs/hwui/
DSkiaCanvas.cpp64 SkiaCanvas::SkiaCanvas(SkCanvas* canvas) : mCanvas(canvas) {} in SkiaCanvas()
68 mCanvas = mCanvasOwned.get(); in SkiaCanvas()
74 if (mCanvas != skiaCanvas) { in reset()
75 mCanvas = skiaCanvas; in reset()
88 mCanvas = mCanvasOwned.get(); in setBitmap()
99 return mCanvas->imageInfo().isOpaque(); in isOpaque()
103 return mCanvas->imageInfo().width(); in width()
107 return mCanvas->imageInfo().height(); in height()
115 return mCanvas->getSaveCount(); in getSaveCount()
119 int count = mCanvas->save(); in save()
[all …]
DSkiaCanvas.h165 SkCanvas* asSkCanvas() { return mCanvas; } in asSkCanvas()
167 void drawDrawable(SkDrawable* drawable) { mCanvas->drawDrawable(drawable); } in drawDrawable()
194 mCanvas->save();
195 mCanvas->translate(offset.fX, offset.fY);
197 mCanvas->restore();
223 SkCanvas* mCanvas; // we do NOT own this canvas, it must survive us variable
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DPenStylusActivity.kt41 private var mCanvas: Canvas? variable in com.android.test.hwui.PenStylusActivity.SingleBufferedCanvas
55 mCanvas = mSurface.lockCanvas(null)
59 if (mCanvas != null) { in lockCanvas()
60 unlockCanvas(mCanvas!!) in lockCanvas()
62 mCanvas = mSurface.lockCanvas(rect) in lockCanvas()
63 return mCanvas!! in lockCanvas()
67 if (this.mCanvas !== canvas) throw IllegalArgumentException() in unlockCanvas()
69 this.mCanvas = null in unlockCanvas()
81 mSurface.unlockCanvasAndPost(mCanvas) in close()
/frameworks/base/libs/hwui/apex/include/android/graphics/
Dcanvas.h106 mCanvas(ACanvas_getNativeHandleFromJava(env, canvasObj)), in Canvas()
109 mCanvas(ACanvas_createCanvas(&buffer, dataspace)), in Canvas()
113 ACanvas_destroyCanvas(mCanvas); in ~Canvas()
119 return ACanvas_setBuffer(mCanvas, buffer, dataspace); in setBuffer()
123 ACanvas_clipRect(mCanvas, &clipRect, doAntiAlias);
127 ACanvas_drawRect(mCanvas, &rect, &paint.get()); in drawRect()
131 ACanvas_drawBitmap(mCanvas, bitmap.get(), left, top, aPaint); in drawBitmap()
135 ACanvas* mCanvas;
/frameworks/base/graphics/java/android/graphics/
DGraphicBuffer.java63 private Canvas mCanvas; field in GraphicBuffer
177 if (mCanvas == null) { in lockCanvas()
178 mCanvas = new Canvas(); in lockCanvas()
181 if (nLockCanvas(mNativeObject, mCanvas, dirty)) { in lockCanvas()
182 mSaveCount = mCanvas.save(); in lockCanvas()
183 return mCanvas; in lockCanvas()
202 if (!mDestroyed && mCanvas != null && canvas == mCanvas) { in unlockCanvasAndPost()
206 nUnlockCanvasAndPost(mNativeObject, mCanvas); in unlockCanvasAndPost()
/frameworks/base/libs/hwui/canvas/
DCanvasOpRasterizer.h38 mCanvas = canvas.get(); in ImmediateModeRasterizer()
43 mCanvas = canvas.get(); in ImmediateModeRasterizer()
48 mCanvas = &(mOwnership.emplace<SkCanvas>(bitmap.getSkBitmap())); in ImmediateModeRasterizer()
54 op.draw(mCanvas); in draw()
59 SkCanvas* mCanvas;
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaProfileRenderer.cpp25 mCanvas->drawRect(rect, paint); in drawRect()
32 mCanvas->drawRect(rect, paint); in drawRects()
37 return mCanvas->imageInfo().width(); in getViewportWidth()
41 return mCanvas->imageInfo().height(); in getViewportHeight()
DSkiaProfileRenderer.h26 explicit SkiaProfileRenderer(SkCanvas* canvas) : mCanvas(canvas) {} in SkiaProfileRenderer()
37 SkCanvas* mCanvas;
DRenderNodeDrawable.cpp126 explicit MarkDraw(SkCanvas& canvas, RenderNode& node) : mCanvas(canvas), mNode(node) { in MarkDraw()
128 mNode.markDrawStart(mCanvas); in MarkDraw()
133 mNode.markDrawEnd(mCanvas); in ~MarkDraw()
138 SkCanvas& mCanvas; member in android::uirenderer::skiapipeline::MarkDraw
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/graph/
DBatteryMeterDrawableBaseTest.java44 private Canvas mCanvas; field in BatteryMeterDrawableBaseTest
63 mBatteryMeterDrawableBase.draw(mCanvas); in testDraw_hasPaddingAndBounds_drawWarningInCorrectPosition()
67 verify(mCanvas).drawText(eq("!"), eq(25f), eq(43.399998f), any(Paint.class)); in testDraw_hasPaddingAndBounds_drawWarningInCorrectPosition()
77 mBatteryMeterDrawableBase.draw(mCanvas); in testDraw_hasPaddingAndBounds_drawBatteryLevelInCorrectPosition()
81 verify(mCanvas).drawText(eq("20"), eq(25f), eq(42.6f), any(Paint.class)); in testDraw_hasPaddingAndBounds_drawBatteryLevelInCorrectPosition()
/frameworks/base/graphics/java/android/graphics/pdf/
DPdfDocument.java388 private Canvas mCanvas; field in PdfDocument.Page
397 mCanvas = canvas; in Page()
434 return mCanvas; in getCanvas()
449 return mCanvas == null; in isFinished()
453 if (mCanvas != null) { in finish()
454 mCanvas.release(); in finish()
455 mCanvas = null; in finish()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/screenshot/
DFakeScrollCaptureConnection.java102 private RecordingCanvas mCanvas; field in FakeScrollCaptureConnection.HwuiContext
118 if (mCanvas != null) { in lockCanvas()
121 mCanvas = mRenderNode.beginRecording(width, height); in lockCanvas()
122 return mCanvas; in lockCanvas()
126 if (canvas != mCanvas) { in unlockAndPost()
131 mCanvas = null; in unlockAndPost()
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/views/
DTiledImageView.java283 private GLES20Canvas mCanvas; field in TiledImageView.TileRenderer
287 mCanvas = new GLES20Canvas(); in onSurfaceCreated()
294 mCanvas.setSize(width, height); in onSurfaceChanged()
300 mCanvas.clearBuffer(); in onDrawFrame()
308 boolean complete = mRenderer.image.draw(mCanvas); in onDrawFrame()
338 private Canvas mCanvas = new Canvas(); field in TiledImageView.ColoredTiles
367 mCanvas.setBitmap(bitmap); in getTile()
368 mCanvas.drawColor(COLORS[level]); in getTile()
372 mCanvas.drawText(x + "x" + y, 128, 128, mPaint); in getTile()
376 mCanvas.drawText(x + "x" + y + " @ " + level, 128, 30, mPaint); in getTile()
[all …]
/frameworks/base/tests/SurfaceComposition/src/android/surfacecomposition/
DCustomSurfaceView.java46 private Canvas mCanvas; field in CustomSurfaceView
103 if (mCanvas != null) { in acquireCanvas()
107 mCanvas = mSurface.lockCanvas(null); in acquireCanvas()
114 if (mCanvas != null) { in releaseCanvas()
119 mSurface.unlockCanvasAndPost(mCanvas); in releaseCanvas()
120 mCanvas = null; in releaseCanvas()
/frameworks/base/core/java/com/android/internal/app/
DSimpleIconFactory.java79 private Canvas mCanvas; field in SimpleIconFactory
167 mCanvas = new Canvas(); in SimpleIconFactory()
168 mCanvas.setDrawFilter(new PaintFlagsDrawFilter(DITHER_FLAG, FILTER_BITMAP_FLAG)); in SimpleIconFactory()
220 mCanvas.setBitmap(bitmap); in createUserBadgedIconBitmap()
221 recreateIcon(Bitmap.createBitmap(bitmap), mCanvas); in createUserBadgedIconBitmap() local
222 mCanvas.setBitmap(null); in createUserBadgedIconBitmap()
278 mCanvas.setBitmap(bitmap); in createAppBadgedIconBitmap()
279 recreateIcon(Bitmap.createBitmap(bitmap), mCanvas); in createAppBadgedIconBitmap() local
287 mCanvas.drawBitmap(renderedAppIcon, mIconBitmapSize - mBadgeBitmapSize, in createAppBadgedIconBitmap()
291 mCanvas.setBitmap(null); in createAppBadgedIconBitmap()
[all …]
/frameworks/base/core/java/android/view/
DTextureView.java194 private Canvas mCanvas; field in TextureView
752 if (mCanvas == null) { in lockCanvas()
753 mCanvas = new Canvas(); in lockCanvas()
757 if (!nLockCanvas(mNativeWindow, mCanvas, dirty)) { in lockCanvas()
761 mSaveCount = mCanvas.save(); in lockCanvas()
763 return mCanvas; in lockCanvas()
778 if (mCanvas != null && canvas == mCanvas) { in unlockCanvasAndPost()
783 nUnlockCanvasAndPost(mNativeWindow, mCanvas); in unlockCanvasAndPost()
DSurface.java136 private final Canvas mCanvas = new CompatibleCanvas(); field in Surface
460 mLockedObject = nativeLockCanvas(mNativeObject, mCanvas, inOutDirty); in lockCanvas()
461 return mCanvas; in lockCanvas()
484 if (canvas != mCanvas) { in unlockSwCanvasAndPost()
1089 private RecordingCanvas mCanvas; field in Surface.HwuiContext
1110 if (mCanvas != null) { in lockCanvas()
1113 mCanvas = mRenderNode.beginRecording(width, height); in lockCanvas()
1114 return mCanvas; in lockCanvas()
1118 if (canvas != mCanvas) { in unlockAndPost()
1123 mCanvas = null; in unlockAndPost()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/util/
DDrawingTestHelper.java64 private final Canvas mCanvas; field in DrawingTestHelper
72 mCanvas = new Canvas(mBitmap); in DrawingTestHelper()
80 view.draw(mCanvas); in drawView()
/frameworks/base/core/tests/coretests/src/android/graphics/
DGraphicsPerformanceTests.java80 protected Canvas mCanvas; field in GraphicsPerformanceTests.GraphicsTestBase
92 mCanvas = new Canvas(mDestBitmap); in setUp()
184 mCanvas.drawBitmap(mBitmap, 0.0f, 0.0f, mPaint); in drawBitmapEven()
190 mCanvas.drawBitmap(mBitmap, 1.0f, 0.0f, mPaint); in drawBitmapOdd()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
DRedEyeFilter.java50 private final Canvas mCanvas = new Canvas(); field in RedEyeFilter
158 mCanvas.setBitmap(redEyeBitmap); in createRedEyeFrame()
163 mCanvas.drawCircle(mCenters[i] * bitmapWidth, mCenters[i + 1] * bitmapHeight, in createRedEyeFrame()
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DIconNormalizer.java70 private final Canvas mCanvas; field in IconNormalizer
92 mCanvas = new Canvas(mBitmap); in IconNormalizer()
186 mCanvas.drawPath(mShapePath, mPaintMaskShape); in isShape()
189 mCanvas.drawPath(mShapePath, mPaintMaskShapeOutline); in isShape()
263 d.draw(mCanvas); in getScale()
DBaseIconFactory.java78 private final Canvas mCanvas; field in BaseIconFactory
117 mCanvas = new Canvas(); in BaseIconFactory()
118 mCanvas.setDrawFilter(new PaintFlagsDrawFilter(DITHER_FLAG, FILTER_BITMAP_FLAG)); in BaseIconFactory()
366 mCanvas.setBitmap(bitmap); in createIconBitmap()
367 drawIconBitmap(mCanvas, icon, scale, bitmapGenerationMode, bitmap); in createIconBitmap()
368 mCanvas.setBitmap(null); in createIconBitmap()
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/
DBitmapRegionTileSource.java377 private Canvas mCanvas; field in BitmapRegionTileSource
486 if (mCanvas == null) { in getTileWithoutReusingBitmap()
487 mCanvas = new Canvas(); in getTileWithoutReusingBitmap()
489 mCanvas.setBitmap(result); in getTileWithoutReusingBitmap()
490 mCanvas.drawBitmap(bitmap, in getTileWithoutReusingBitmap()
493 mCanvas.setBitmap(null); in getTileWithoutReusingBitmap()
/frameworks/base/core/java/android/app/
DLauncherActivity.java258 private Canvas mCanvas = new Canvas(); field in LauncherActivity.IconResizer
261 mCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG, in IconResizer()
307 final Canvas canvas = mCanvas; in createIconThumbnail()
325 final Canvas canvas = mCanvas; in createIconThumbnail()

12