| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surfaces/surface_factory.h" | 5 #include "cc/surfaces/surface_factory.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/surfaces/surface.h" | 8 #include "cc/surfaces/surface.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 manager_->DeregisterSurface(surface_id); | 33 manager_->DeregisterSurface(surface_id); |
| 34 surface_map_.erase(it); | 34 surface_map_.erase(it); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void SurfaceFactory::SubmitFrame(SurfaceId surface_id, | 37 void SurfaceFactory::SubmitFrame(SurfaceId surface_id, |
| 38 scoped_ptr<CompositorFrame> frame) { | 38 scoped_ptr<CompositorFrame> frame) { |
| 39 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); | 39 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); |
| 40 DCHECK(it != surface_map_.end()); | 40 DCHECK(it != surface_map_.end()); |
| 41 DCHECK(it->second->factory() == this); | 41 DCHECK(it->second->factory() == this); |
| 42 it->second->QueueFrame(frame.Pass()); | 42 it->second->QueueFrame(frame.Pass()); |
| 43 manager_->SurfaceModified(surface_id); |
| 43 } | 44 } |
| 44 | 45 |
| 45 void SurfaceFactory::ReceiveFromChild( | 46 void SurfaceFactory::ReceiveFromChild( |
| 46 const TransferableResourceArray& resources) { | 47 const TransferableResourceArray& resources) { |
| 47 holder_.ReceiveFromChild(resources); | 48 holder_.ReceiveFromChild(resources); |
| 48 } | 49 } |
| 49 | 50 |
| 50 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) { | 51 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) { |
| 51 holder_.RefResources(resources); | 52 holder_.RefResources(resources); |
| 52 } | 53 } |
| 53 | 54 |
| 54 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) { | 55 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) { |
| 55 holder_.UnrefResources(resources); | 56 holder_.UnrefResources(resources); |
| 56 } | 57 } |
| 57 | 58 |
| 58 } // namespace cc | 59 } // namespace cc |
| OLD | NEW |