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

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

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Changed SurfaceManager::kRootSurfaceId to a private field to avoid static initialization Created 4 years, 1 month 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
« no previous file with comments | « cc/ipc/DEPS ('k') | cc/ipc/cc_param_traits_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/unguessable_token.h"
12 #include "cc/output/compositor_frame.h" 13 #include "cc/output/compositor_frame.h"
13 #include "cc/output/filter_operations.h" 14 #include "cc/output/filter_operations.h"
14 #include "cc/quads/debug_border_draw_quad.h" 15 #include "cc/quads/debug_border_draw_quad.h"
15 #include "cc/quads/draw_quad.h" 16 #include "cc/quads/draw_quad.h"
16 #include "cc/quads/largest_draw_quad.h" 17 #include "cc/quads/largest_draw_quad.h"
17 #include "cc/quads/render_pass_draw_quad.h" 18 #include "cc/quads/render_pass_draw_quad.h"
18 #include "cc/quads/solid_color_draw_quad.h" 19 #include "cc/quads/solid_color_draw_quad.h"
19 #include "cc/quads/surface_draw_quad.h" 20 #include "cc/quads/surface_draw_quad.h"
20 #include "cc/quads/tile_draw_quad.h" 21 #include "cc/quads/tile_draw_quad.h"
21 #include "cc/quads/yuv_video_draw_quad.h" 22 #include "cc/quads/yuv_video_draw_quad.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 WriteParam(m, p.nonce()); 615 WriteParam(m, p.nonce());
615 } 616 }
616 617
617 bool ParamTraits<cc::LocalFrameId>::Read(const base::Pickle* m, 618 bool ParamTraits<cc::LocalFrameId>::Read(const base::Pickle* m,
618 base::PickleIterator* iter, 619 base::PickleIterator* iter,
619 param_type* p) { 620 param_type* p) {
620 uint32_t local_id; 621 uint32_t local_id;
621 if (!ReadParam(m, iter, &local_id)) 622 if (!ReadParam(m, iter, &local_id))
622 return false; 623 return false;
623 624
624 uint64_t nonce; 625 base::UnguessableToken nonce;
625 if (!ReadParam(m, iter, &nonce)) 626 if (!ReadParam(m, iter, &nonce))
626 return false; 627 return false;
627 628
628 *p = cc::LocalFrameId(local_id, nonce); 629 *p = cc::LocalFrameId(local_id, nonce);
629 return true; 630 return true;
630 } 631 }
631 632
632 void ParamTraits<cc::LocalFrameId>::Log(const param_type& p, std::string* l) { 633 void ParamTraits<cc::LocalFrameId>::Log(const param_type& p, std::string* l) {
633 l->append("LocalFrameId("); 634 l->append("LocalFrameId(");
634 LogParam(p.local_id(), l); 635 LogParam(p.local_id(), l);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_ 972 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_
972 #include "cc/ipc/cc_param_traits_macros.h" 973 #include "cc/ipc/cc_param_traits_macros.h"
973 } // namespace IPC 974 } // namespace IPC
974 975
975 // Generate param traits log methods. 976 // Generate param traits log methods.
976 #include "ipc/param_traits_log_macros.h" 977 #include "ipc/param_traits_log_macros.h"
977 namespace IPC { 978 namespace IPC {
978 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_ 979 #undef CC_IPC_CC_PARAM_TRAITS_MACROS_H_
979 #include "cc/ipc/cc_param_traits_macros.h" 980 #include "cc/ipc/cc_param_traits_macros.h"
980 } // namespace IPC 981 } // namespace IPC
OLDNEW
« no previous file with comments | « cc/ipc/DEPS ('k') | cc/ipc/cc_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698