[ui/surface] Separate image processing logic from presentation logic.

The D3D image processing code from AcceleratedPresenter moves to its own class, "ui/surface/accelerated_surface_transformer_win.h". This split allows the image processing code to be tested independently of the present-scheduling system, and so we add unit tests doing exactly that. Utility functions (loading d3d, creating temp surfaces) doing things commonly required by test, transform, and present code -- these functions are moved to a third location, "ui/surface/d3d9_utils_win.h"

The new unit tests -- which live in the ui_unittests binary -- make extensive use of pseudorandom image content, which I think is kind of neat. The tests use D3D HAL devices; I tried to use REF, but it didn't work, as StretchRect+LINEAR is not supported by refrast. So as a result we may have a GPU vendor dependency in these results.

BUG=161537
TEST=new ui_unittests

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174028

Review URL: https://chromiumcodereview.appspot.com/11464017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174338 0039d316-1c4b-4281-b951-d872f2087c98
9 files changed