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

Unified Diff: gpu/command_buffer/service/texture_manager.cc

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 38516e7d49a7887c5685917a36fb585463ad9d1b..ed0add1a9569540ce7c6cdbf20763d375af5e85c 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -817,6 +817,21 @@ gfx::GLImage* Texture::GetLevelImage(GLint target, GLint level) const {
return 0;
}
+void Texture::OnWillModifyPixels() {
+ if (target()) {
+ gfx::GLImage* image = GetLevelImage(target(), 0);
+ if (image)
+ image->WillModifyPixels();
+ }
+}
+
+void Texture::OnDidModifyPixels() {
+ if (target()) {
+ gfx::GLImage* image = GetLevelImage(target(), 0);
+ if (image)
+ image->DidModifyPixels();
+ }
+}
TextureRef::TextureRef(TextureManager* manager,
GLuint client_id,

Powered by Google App Engine
This is Rietveld 408576698