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

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

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments 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
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/framebuffer_manager.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 48e503cb45b3d1e64986d369edfe70d7f3557c16..7dfba400d24704d31a79cba36c62655b1c81bba8 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -119,6 +119,9 @@ class RenderbufferAttachment
renderbuffer_->AddToSignature(signature);
}
+ virtual void OnWillRenderTo() const OVERRIDE {}
+ virtual void OnDidRenderTo() const OVERRIDE {}
+
protected:
virtual ~RenderbufferAttachment() { }
@@ -243,6 +246,14 @@ class TextureAttachment
texture_ref_.get(), target_, level_, signature);
}
+ virtual void OnWillRenderTo() const OVERRIDE {
+ texture_ref_->texture()->OnWillModifyPixels();
+ }
+
+ virtual void OnDidRenderTo() const OVERRIDE {
+ texture_ref_->texture()->OnDidModifyPixels();
+ }
+
protected:
virtual ~TextureAttachment() {}
@@ -615,6 +626,20 @@ void Framebuffer::OnTextureRefDetached(TextureRef* texture) {
manager_->OnTextureRefDetached(texture);
}
+void Framebuffer::OnWillRenderTo() const {
+ for (AttachmentMap::const_iterator it = attachments_.begin();
+ it != attachments_.end(); ++it) {
+ it->second->OnWillRenderTo();
+ }
+}
+
+void Framebuffer::OnDidRenderTo() const {
+ for (AttachmentMap::const_iterator it = attachments_.begin();
+ it != attachments_.end(); ++it) {
+ it->second->OnDidRenderTo();
+ }
+}
+
bool FramebufferManager::GetClientId(
GLuint service_id, GLuint* client_id) const {
// This doesn't need to be fast. It's only used during slow queries.
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698