| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 | 198 |
| 199 void SoftwareFrameManager::EvictCurrentFrame() { | 199 void SoftwareFrameManager::EvictCurrentFrame() { |
| 200 DCHECK(HasCurrentFrame()); | 200 DCHECK(HasCurrentFrame()); |
| 201 DiscardCurrentFrame(); | 201 DiscardCurrentFrame(); |
| 202 if (client_) | 202 if (client_) |
| 203 client_->ReleaseReferencesToSoftwareFrame(); | 203 client_->ReleaseReferencesToSoftwareFrame(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace content | 206 } // namespace content |
| OLD | NEW |