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

Side by Side Diff: cc/ipc/cc_param_traits.cc

Issue 2136413002: Update Surface ID Terminology (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed webkit_unit_tests Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/ipc/cc_param_traits.h" 5 #include "cc/ipc/cc_param_traits.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 break; 563 break;
564 case cc::DrawQuad::INVALID: 564 case cc::DrawQuad::INVALID:
565 break; 565 break;
566 } 566 }
567 } 567 }
568 l->append("])"); 568 l->append("])");
569 } 569 }
570 570
571 void ParamTraits<cc::SurfaceId>::GetSize(base::PickleSizer* s, 571 void ParamTraits<cc::SurfaceId>::GetSize(base::PickleSizer* s,
572 const param_type& p) { 572 const param_type& p) {
573 GetParamSize(s, p.id_namespace()); 573 GetParamSize(s, p.client_id());
574 GetParamSize(s, p.local_id()); 574 GetParamSize(s, p.local_id());
575 GetParamSize(s, p.nonce()); 575 GetParamSize(s, p.nonce());
576 } 576 }
577 577
578 void ParamTraits<cc::SurfaceId>::Write(base::Pickle* m, const param_type& p) { 578 void ParamTraits<cc::SurfaceId>::Write(base::Pickle* m, const param_type& p) {
579 WriteParam(m, p.id_namespace()); 579 WriteParam(m, p.client_id());
580 WriteParam(m, p.local_id()); 580 WriteParam(m, p.local_id());
581 WriteParam(m, p.nonce()); 581 WriteParam(m, p.nonce());
582 } 582 }
583 583
584 bool ParamTraits<cc::SurfaceId>::Read(const base::Pickle* m, 584 bool ParamTraits<cc::SurfaceId>::Read(const base::Pickle* m,
585 base::PickleIterator* iter, 585 base::PickleIterator* iter,
586 param_type* p) { 586 param_type* p) {
587 uint32_t id_namespace; 587 uint32_t client_id;
588 if (!ReadParam(m, iter, &id_namespace)) 588 if (!ReadParam(m, iter, &client_id))
589 return false; 589 return false;
590 590
591 uint32_t local_id; 591 uint32_t local_id;
592 if (!ReadParam(m, iter, &local_id)) 592 if (!ReadParam(m, iter, &local_id))
593 return false; 593 return false;
594 594
595 uint64_t nonce; 595 uint64_t nonce;
596 if (!ReadParam(m, iter, &nonce)) 596 if (!ReadParam(m, iter, &nonce))
597 return false; 597 return false;
598 598
599 *p = cc::SurfaceId(id_namespace, local_id, nonce); 599 *p = cc::SurfaceId(client_id, local_id, nonce);
600 return true; 600 return true;
601 } 601 }
602 602
603 void ParamTraits<cc::SurfaceId>::Log(const param_type& p, std::string* l) { 603 void ParamTraits<cc::SurfaceId>::Log(const param_type& p, std::string* l) {
604 l->append("SurfaceId("); 604 l->append("SurfaceId(");
605 LogParam(p.id_namespace(), l); 605 LogParam(p.client_id(), l);
606 l->append(", "); 606 l->append(", ");
607 LogParam(p.local_id(), l); 607 LogParam(p.local_id(), l);
608 l->append(", "); 608 l->append(", ");
609 LogParam(p.nonce(), l); 609 LogParam(p.nonce(), l);
610 l->append(")"); 610 l->append(")");
611 } 611 }
612 612
613 namespace { 613 namespace {
614 enum CompositorFrameType { 614 enum CompositorFrameType {
615 NO_FRAME, 615 NO_FRAME,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_ 944 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_
945 #include "cc/ipc/cc_param_traits_macros.h" 945 #include "cc/ipc/cc_param_traits_macros.h"
946 } // namespace IPC 946 } // namespace IPC
947 947
948 // Generate param traits log methods. 948 // Generate param traits log methods.
949 #include "ipc/param_traits_log_macros.h" 949 #include "ipc/param_traits_log_macros.h"
950 namespace IPC { 950 namespace IPC {
951 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_ 951 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_
952 #include "cc/ipc/cc_param_traits_macros.h" 952 #include "cc/ipc/cc_param_traits_macros.h"
953 } // namespace IPC 953 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698