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

Side by Side Diff: content/browser/devtools/devtools_frame_trace_recorder.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "content/browser/devtools/devtools_frame_trace_recorder.h" 5 #include "content/browser/devtools/devtools_frame_trace_recorder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const cc::CompositorFrameMetadata& frame_metadata) { 135 const cc::CompositorFrameMetadata& frame_metadata) {
136 if (!host || !ScreenshotCategoryEnabled()) { 136 if (!host || !ScreenshotCategoryEnabled()) {
137 last_metadata_.reset(); 137 last_metadata_.reset();
138 return; 138 return;
139 } 139 }
140 140
141 bool is_new_trace; 141 bool is_new_trace;
142 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); 142 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
143 if (!is_new_trace && last_metadata_) 143 if (!is_new_trace && last_metadata_)
144 CaptureFrame(host, *last_metadata_); 144 CaptureFrame(host, *last_metadata_);
145 last_metadata_.reset(new cc::CompositorFrameMetadata(frame_metadata)); 145 last_metadata_.reset(new cc::CompositorFrameMetadata);
146 *last_metadata_ = frame_metadata.Clone();
146 } 147 }
147 148
148 } // namespace content 149 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698