FramebufferSurface: fix for limitFramebufferSize

This CL fixes limitFramebufferSize and adds a test for the
broken use case. Also limitFramebufferSize is renamed to
limitSize  because "Framebuffer" is implied by the class
name. The implementation is moved to a static
limitSizeInternal which can be tested more easily.

Bug: 180908183
Test: atest FramebufferSurfaceTest
Change-Id: Ic094b36fef6f9a17c87ec95a6c3f5f0a09c99d2f
4 files changed