Loading libs/binder/Parcel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1276,7 +1276,7 @@ status_t Parcel::write(const FlattenableHelperInterface& val) if (err) return err; // payload void* const buf = this->writeInplace(pad_size(len)); void* const buf = this->writeInplace(len); if (buf == NULL) return BAD_VALUE; Loading libs/nativewindow/ANativeWindow.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,10 @@ int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transfo constexpr int32_t kAllTransformBits = ANATIVEWINDOW_TRANSFORM_MIRROR_HORIZONTAL | ANATIVEWINDOW_TRANSFORM_MIRROR_VERTICAL | ANATIVEWINDOW_TRANSFORM_ROTATE_90; ANATIVEWINDOW_TRANSFORM_ROTATE_90 | // We don't expose INVERSE_DISPLAY as an NDK constant, but someone could have read it // from a buffer already set by Camera framework, so we allow it to be forwarded. NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) return -EINVAL; if ((transform & ~kAllTransformBits) != 0) Loading libs/ui/Region.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -838,6 +838,11 @@ Region::const_iterator Region::begin() const { } Region::const_iterator Region::end() const { // Workaround for b/77643177 // mStorage should never be empty, but somehow it is and it's causing // an abort in ubsan if (mStorage.isEmpty()) return mStorage.array(); size_t numRects = isRect() ? 1 : mStorage.size() - 1; return mStorage.array() + numRects; } Loading services/displayservice/DisplayEventReceiver.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -102,10 +102,20 @@ int DisplayEventReceiver::AttachedEvent::handleEvent(int fd, int events, void* / switch(buf[i].header.type) { case FwkReceiver::DISPLAY_EVENT_VSYNC: { mCallback->onVsync(timestamp, event.vsync.count); auto ret = mCallback->onVsync(timestamp, event.vsync.count); if (!ret.isOk()) { LOG(ERROR) << "AttachedEvent handleEvent fails on onVsync callback" << " because of " << ret.description(); return 0; // remove the callback } } break; case FwkReceiver::DISPLAY_EVENT_HOTPLUG: { mCallback->onHotplug(timestamp, event.hotplug.connected); auto ret = mCallback->onHotplug(timestamp, event.hotplug.connected); if (!ret.isOk()) { LOG(ERROR) << "AttachedEvent handleEvent fails on onHotplug callback" << " because of " << ret.description(); return 0; // remove the callback } } break; default: { LOG(ERROR) << "AttachedEvent handleEvent unknown type: " << type; Loading services/surfaceflinger/ColorLayer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -44,13 +44,13 @@ ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const void ColorLayer::onDraw(const RenderArea& renderArea, const Region& /* clip */, bool useIdentityTransform) const { const State& s(getDrawingState()); if (s.color.a > 0) { half4 color = getColor(); if (color.a > 0) { Mesh mesh(Mesh::TRIANGLE_FAN, 4, 2); computeGeometry(renderArea, mesh, useIdentityTransform); auto& engine(mFlinger->getRenderEngine()); engine.setupLayerBlending(getPremultipledAlpha(), false /* opaque */, true /* disableTexture */, s.color); true /* disableTexture */, color); engine.drawMesh(mesh); engine.disableBlending(); } Loading Loading
libs/binder/Parcel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1276,7 +1276,7 @@ status_t Parcel::write(const FlattenableHelperInterface& val) if (err) return err; // payload void* const buf = this->writeInplace(pad_size(len)); void* const buf = this->writeInplace(len); if (buf == NULL) return BAD_VALUE; Loading
libs/nativewindow/ANativeWindow.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,10 @@ int32_t ANativeWindow_setBuffersTransform(ANativeWindow* window, int32_t transfo constexpr int32_t kAllTransformBits = ANATIVEWINDOW_TRANSFORM_MIRROR_HORIZONTAL | ANATIVEWINDOW_TRANSFORM_MIRROR_VERTICAL | ANATIVEWINDOW_TRANSFORM_ROTATE_90; ANATIVEWINDOW_TRANSFORM_ROTATE_90 | // We don't expose INVERSE_DISPLAY as an NDK constant, but someone could have read it // from a buffer already set by Camera framework, so we allow it to be forwarded. NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) return -EINVAL; if ((transform & ~kAllTransformBits) != 0) Loading
libs/ui/Region.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -838,6 +838,11 @@ Region::const_iterator Region::begin() const { } Region::const_iterator Region::end() const { // Workaround for b/77643177 // mStorage should never be empty, but somehow it is and it's causing // an abort in ubsan if (mStorage.isEmpty()) return mStorage.array(); size_t numRects = isRect() ? 1 : mStorage.size() - 1; return mStorage.array() + numRects; } Loading
services/displayservice/DisplayEventReceiver.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -102,10 +102,20 @@ int DisplayEventReceiver::AttachedEvent::handleEvent(int fd, int events, void* / switch(buf[i].header.type) { case FwkReceiver::DISPLAY_EVENT_VSYNC: { mCallback->onVsync(timestamp, event.vsync.count); auto ret = mCallback->onVsync(timestamp, event.vsync.count); if (!ret.isOk()) { LOG(ERROR) << "AttachedEvent handleEvent fails on onVsync callback" << " because of " << ret.description(); return 0; // remove the callback } } break; case FwkReceiver::DISPLAY_EVENT_HOTPLUG: { mCallback->onHotplug(timestamp, event.hotplug.connected); auto ret = mCallback->onHotplug(timestamp, event.hotplug.connected); if (!ret.isOk()) { LOG(ERROR) << "AttachedEvent handleEvent fails on onHotplug callback" << " because of " << ret.description(); return 0; // remove the callback } } break; default: { LOG(ERROR) << "AttachedEvent handleEvent unknown type: " << type; Loading
services/surfaceflinger/ColorLayer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -44,13 +44,13 @@ ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const void ColorLayer::onDraw(const RenderArea& renderArea, const Region& /* clip */, bool useIdentityTransform) const { const State& s(getDrawingState()); if (s.color.a > 0) { half4 color = getColor(); if (color.a > 0) { Mesh mesh(Mesh::TRIANGLE_FAN, 4, 2); computeGeometry(renderArea, mesh, useIdentityTransform); auto& engine(mFlinger->getRenderEngine()); engine.setupLayerBlending(getPremultipledAlpha(), false /* opaque */, true /* disableTexture */, s.color); true /* disableTexture */, color); engine.drawMesh(mesh); engine.disableBlending(); } Loading