Loading libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -60,12 +60,11 @@ void SkiaRecordingCanvas::punchHole(const SkRRect& rect) { // Add the marker annotation to allow HWUI to determine where the current // clip/transformation should be applied SkVector vector = rect.getSimpleRadii(); const int dataSize = 2; float data[dataSize]; float data[2]; data[0] = vector.x(); data[1] = vector.y(); mRecorder.drawAnnotation(rect.rect(), HOLE_PUNCH_ANNOTATION.c_str(), SkData::MakeWithCopy(data, dataSize)); SkData::MakeWithCopy(data, 2 * sizeof(float))); // Clear the current rect within the layer itself SkPaint paint = SkPaint(); Loading libs/hwui/pipeline/skia/TransformCanvas.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ using namespace android::uirenderer::skiapipeline; void TransformCanvas::onDrawAnnotation(const SkRect& rect, const char* key, SkData* value) { if (HOLE_PUNCH_ANNOTATION == key) { auto* rectParams = static_cast<const float*>(value->data()); auto* rectParams = reinterpret_cast<const float*>(value->data()); float radiusX = rectParams[0]; float radiusY = rectParams[1]; SkRRect roundRect = SkRRect::MakeRectXY(rect, radiusX, radiusY); Loading Loading
libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -60,12 +60,11 @@ void SkiaRecordingCanvas::punchHole(const SkRRect& rect) { // Add the marker annotation to allow HWUI to determine where the current // clip/transformation should be applied SkVector vector = rect.getSimpleRadii(); const int dataSize = 2; float data[dataSize]; float data[2]; data[0] = vector.x(); data[1] = vector.y(); mRecorder.drawAnnotation(rect.rect(), HOLE_PUNCH_ANNOTATION.c_str(), SkData::MakeWithCopy(data, dataSize)); SkData::MakeWithCopy(data, 2 * sizeof(float))); // Clear the current rect within the layer itself SkPaint paint = SkPaint(); Loading
libs/hwui/pipeline/skia/TransformCanvas.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ using namespace android::uirenderer::skiapipeline; void TransformCanvas::onDrawAnnotation(const SkRect& rect, const char* key, SkData* value) { if (HOLE_PUNCH_ANNOTATION == key) { auto* rectParams = static_cast<const float*>(value->data()); auto* rectParams = reinterpret_cast<const float*>(value->data()); float radiusX = rectParams[0]; float radiusY = rectParams[1]; SkRRect roundRect = SkRRect::MakeRectXY(rect, radiusX, radiusY); Loading