Fix PixelCopy & BQ crop
Change Surface to return the original crop rect + transform int instead of a matrix in GL's bottom-left origin in 0..1 space. This avoids doing an extreme amount of matrix pulling apart to try and guess at the inputs and map rects around to make it maybe work sometimes along with avoiding the need to convert that matrix into skia's top-left non-unit space. This also opens the door to avoiding the 1 texel crop problem if ASurfaceTexture is similarly adjusted to return the crop+transform instead of a float[16] matrix as we are using a proper srcRect to sample from instead of purely done via matrix manipulation. This CL continues to pass kFast_SrcRectConstraint so we don't actually benefit but it at least COULD. Fixes: 183553027 Test: atest android.view.cts.PixelCopyTest (+new testBufferQueueCrop) Change-Id: I5f638153baed7f67dc43fe9ecb4587f579222b5d
Loading
Please register or sign in to comment