OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer_host/software_frame_manager.h" | 5 #include "content/browser/renderer_host/software_frame_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
10 #include "content/browser/renderer_host/dip_util.h" | 10 #include "content/browser/renderer_host/dip_util.h" |
11 #include "content/public/browser/user_metrics.h" | 11 #include "content/public/browser/user_metrics.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 void ReleaseMailbox(scoped_refptr<content::SoftwareFrame> frame, | 15 void ReleaseMailbox(scoped_refptr<content::SoftwareFrame> frame, |
16 unsigned sync_point, | 16 uint32 sync_point, |
17 bool lost_resource) {} | 17 bool lost_resource) {} |
18 | 18 |
19 } // namespace | 19 } // namespace |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 //////////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////////// |
24 // SoftwareFrame | 24 // SoftwareFrame |
25 | 25 |
26 class CONTENT_EXPORT SoftwareFrame : public base::RefCounted<SoftwareFrame> { | 26 class CONTENT_EXPORT SoftwareFrame : public base::RefCounted<SoftwareFrame> { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 | 183 |
184 void SoftwareFrameManager::EvictCurrentFrame() { | 184 void SoftwareFrameManager::EvictCurrentFrame() { |
185 DCHECK(HasCurrentFrame()); | 185 DCHECK(HasCurrentFrame()); |
186 DiscardCurrentFrame(); | 186 DiscardCurrentFrame(); |
187 if (client_) | 187 if (client_) |
188 client_->ReleaseReferencesToSoftwareFrame(); | 188 client_->ReleaseReferencesToSoftwareFrame(); |
189 } | 189 } |
190 | 190 |
191 } // namespace content | 191 } // namespace content |
OLD | NEW |