Index: content/browser/compositor/reflector_texture.cc |
diff --git a/content/browser/compositor/reflector_texture.cc b/content/browser/compositor/reflector_texture.cc |
index 7db8c87cc8cacfc076fdd535c93333a8d252dbf8..7f32fa17123a372492499239c2d4852942098fbb 100644 |
--- a/content/browser/compositor/reflector_texture.cc |
+++ b/content/browser/compositor/reflector_texture.cc |
@@ -31,6 +31,7 @@ ReflectorTexture::~ReflectorTexture() { |
} |
void ReflectorTexture::CopyTextureFullImage(const gfx::Size& size) { |
+ is_texture_defined_ = true; |
gl_helper_->CopyTextureFullImage(texture_id_, size); |
// Insert a barrier to make the copy show up in the mirroring compositor's |
// mailbox. Since the the compositor contexts and the |
@@ -41,6 +42,7 @@ void ReflectorTexture::CopyTextureFullImage(const gfx::Size& size) { |
} |
void ReflectorTexture::CopyTextureSubImage(const gfx::Rect& rect) { |
+ DCHECK(is_texture_defined_); |
gl_helper_->CopyTextureSubImage(texture_id_, rect); |
// Insert a barrier for the same reason above. |
gl_helper_->InsertOrderingBarrier(); |