During image destroy, delete textures only if we have a GL context.
This adds Destroy function for ImageManager and invoke it from
command decoder destroy path with GL context info.
This is to ensure that when we destroy the image,
textures to which the image is bound to,
is deleted only if we have a GL context.
BUG=375507
Review URL: https://codereview.chromium.org/301793003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286811 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gl/gl_image_stub.cc b/ui/gl/gl_image_stub.cc
index d789ce5..a6f1f525 100644
--- a/ui/gl/gl_image_stub.cc
+++ b/ui/gl/gl_image_stub.cc
@@ -8,7 +8,7 @@
GLImageStub::GLImageStub() {}
-GLImageStub::~GLImageStub() { Destroy(); }
+GLImageStub::~GLImageStub() {}
gfx::Size GLImageStub::GetSize() { return gfx::Size(1, 1); }