There were two problems (both fixed in this CL):
1) When we were resized by the view manager, we forgot to deflate by the
device-pixel-ratio when converting to engine types. That caused use to
allocate a backing texture that was 9x what we needed.
2) When the surfaces system returned textures to us for re-use, we'd put them
into the cache even if they were the old size. That caused us to thrash the
texture cache. In this CL, we make the size of the textures in the cache
explicit.
R=eseidel@chromium.org
BUG=449001
Review URL: https://codereview.chromium.org/868263002
Previously, we were creating a new texture for every frame. Using tracing on a
Nexus 5, that appears to cost about 6ms per frame on the GPU thread. After this
CL, we keep a cache of recently used textures and only allocate a new one when
either (1) we don't have one free or (2) our size requirements have changed.
If our size requirements change, we dump the whole texture cache. In the
future, we'll probably need something fancier if we ever need more than one
size texture per frame.
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/845963006
This CL goes from this:
//mojo/services/public/cpp/surfaces
//mojo/services/public/interfaces/surfaces
to this:
//mojo/services/surfaces/public/cpp
//mojo/services/surfaces/public/interfaces
This CL also makes the Mojo-side changes required to roll this change into
Chromium.
TBR=beng
Review URL: https://codereview.chromium.org/792813002