Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1037)

Unified Diff: content/browser/compositor/reflector_texture.cc

Issue 2797443003: Fix screen mirroring on Chrome OS (ReflectorTexture partial swap) (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698