Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 884d3fbe authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Merge "Fix merged bitmap mesh generation and reenable merging" into nyc-dev

am: 3f445f0e

* commit '3f445f0e':
  Fix merged bitmap mesh generation and reenable merging
parents 6bfc3bd8 3f445f0e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -61,7 +61,10 @@ void BakedOpDispatcher::onMergedBitmapOps(BakedOpRenderer& renderer,
    for (size_t i = 0; i < opList.count; i++) {
        const BakedOpState& state = *(opList.states[i]);
        TextureVertex* rectVerts = &vertices[i * 4];
        Rect opBounds = state.computedState.clippedBounds;

        // calculate unclipped bounds, since they'll determine texture coordinates
        Rect opBounds = state.op->unmappedBounds;
        state.computedState.transform.mapRect(opBounds);
        if (CC_LIKELY(state.computedState.transform.isPureTranslate())) {
            // pure translate, so snap (same behavior as onBitmapOp)
            opBounds.snapToPixelBoundaries();
+0 −5
Original line number Diff line number Diff line
@@ -517,10 +517,6 @@ void FrameBuilder::deferBitmapOp(const BitmapOp& op) {
    BakedOpState* bakedState = tryBakeOpState(op);
    if (!bakedState) return; // quick rejected

    currentLayer().deferUnmergeableOp(mAllocator, bakedState, OpBatchType::Bitmap);

    // TODO: Fix this ( b/26569206 )
/*
    // Don't merge non-simply transformed or neg scale ops, SET_TEXTURE doesn't handle rotation
    // Don't merge A8 bitmaps - the paint's color isn't compared by mergeId, or in
    // MergingDrawBatch::canMergeWith()
@@ -535,7 +531,6 @@ void FrameBuilder::deferBitmapOp(const BitmapOp& op) {
    } else {
        currentLayer().deferUnmergeableOp(mAllocator, bakedState, OpBatchType::Bitmap);
    }
*/
}

void FrameBuilder::deferBitmapMeshOp(const BitmapMeshOp& op) {
+1 −2
Original line number Diff line number Diff line
@@ -216,8 +216,7 @@ TEST(FrameBuilder, simpleBatching) {
            << "Expect number of ops = 2 * loop count";
}

// TODO: Disabled due to b/26793764
TEST(FrameBuilder, DISABLED_clippedMerging) {
TEST(FrameBuilder, clippedMerging) {
    class ClippedMergingTestRenderer : public TestRendererBase {
    public:
        void onMergedBitmapOps(const MergedBakedOpList& opList) override {