cc: Use ResourceProvider::Resouce::type to check the type of the given resource.
Currently, some code uses the type variable to check the type of
the given resource, while other code uses the shared_bitmap,
pixels or mailbox variable to check the same condition.
This CL makes all code use the type variable for this purpose.
In addition, this CL clarify texture_pool can be non-null only if
the type is Texture and the origin is Internal.
In addition, add several DCHECKs to increase readability.
BUG=337519
Review URL: https://codereview.chromium.org/
135273008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248861 0039d316-1c4b-4281-b951-d872f2087c98