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

Unified Diff: gpu/ipc/common/gpu_command_buffer_traits.cc

Issue 2061993003: Pass responsibility for IOSurface-texture reuse to the gpu process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp85_query_in_use
Patch Set: Rebase. Created 4 years, 6 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/ipc/common/gpu_command_buffer_traits.h ('k') | gpu/ipc/common/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/common/gpu_command_buffer_traits.cc
diff --git a/gpu/ipc/common/gpu_command_buffer_traits.cc b/gpu/ipc/common/gpu_command_buffer_traits.cc
index e7105f3d2f4938440a8c8d80a27b31161028f561..a6d68c3fbded4ff33614d9b93bacc8d43c998fb5 100644
--- a/gpu/ipc/common/gpu_command_buffer_traits.cc
+++ b/gpu/ipc/common/gpu_command_buffer_traits.cc
@@ -10,6 +10,7 @@
#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
#include "gpu/command_buffer/common/sync_token.h"
+#include "gpu/command_buffer/common/texture_in_use_response.h"
// Generate param traits size methods.
#include "ipc/param_traits_size_macros.h"
@@ -121,6 +122,38 @@ void ParamTraits<gpu::SyncToken>::Log(const param_type& p, std::string* l) {
p.command_buffer_id().GetUnsafeValue(), p.release_count());
}
+void ParamTraits<gpu::TextureInUseResponse>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.texture);
+ GetParamSize(s, p.in_use);
+}
+
+void ParamTraits<gpu::TextureInUseResponse>::Write(base::Pickle* m,
+ const param_type& p) {
+ WriteParam(m, p.texture);
+ WriteParam(m, p.in_use);
+}
+
+bool ParamTraits<gpu::TextureInUseResponse>::Read(const base::Pickle* m,
+ base::PickleIterator* iter,
+ param_type* p) {
+ uint32_t texture = 0;
+ bool in_use = false;
+
+ if (!ReadParam(m, iter, &texture) || !ReadParam(m, iter, &in_use)) {
+ return false;
+ }
+
+ p->texture = texture;
+ p->in_use = in_use;
+ return true;
+}
+
+void ParamTraits<gpu::TextureInUseResponse>::Log(const param_type& p,
+ std::string* l) {
+ *l += base::StringPrintf("[%u: %d]", p.texture, static_cast<int>(p.in_use));
+}
+
void ParamTraits<gpu::Mailbox>::GetSize(base::PickleSizer* s,
const param_type& p) {
s->AddBytes(sizeof(p.name));
« no previous file with comments | « gpu/ipc/common/gpu_command_buffer_traits.h ('k') | gpu/ipc/common/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698