Fix missing include of common_defines.gypi.

Change-Id: I308956a700df4d440573fbae89e67cab0f2cf482
Reviewed-on: https://chromium-review.googlesource.com/224653
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
Restrict use of TexStorage more in CopyImage.

We were being too permissive in some copyImage methods when checking
if we can create a render target or not. This would lead us to trying
to use an inconsistent TexStorage in some cases.

Note that we do need to create inconsistent TexStorage in cases where
we are doing a FBO copy *from* a mipmap-incomplete texture attachment.

BUG=angle:780

Change-Id: I5a849b5d8c53713e38cb5f5052a8bb88b3f56260
Reviewed-on: https://chromium-review.googlesource.com/224480
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Make commitRegion a base method of TextureD3D.

Use a helper method isValidIndex to preserve ASSERT checks.

Refactoring patch only.

BUG=angle:741

Change-Id: Ie19fa21db51cd0239a3b391de362584a9fbab2df
Reviewed-on: https://chromium-review.googlesource.com/222268
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>