Chromium Code Reviews| Index: cc/resources/scoped_ui_resource.h |
| diff --git a/cc/resources/scoped_ui_resource.h b/cc/resources/scoped_ui_resource.h |
| index 628d372c552f2707965b2011731dc3db4b0cc141..cc46395b3e387fbba271a259b3873f92ae0e8c9c 100644 |
| --- a/cc/resources/scoped_ui_resource.h |
| +++ b/cc/resources/scoped_ui_resource.h |
| @@ -15,6 +15,12 @@ namespace cc { |
| class LayerTreeHost; |
| +// ScopedUIResource creates an UIResource from a bitmap and a LayerTreeHost. |
| +// This class holds a pointer to the host so that when the instance goes out of |
| +// scope, the created resource is deleted. On a GetBitmap call from the |
| +// UIResource manager, ScopeUIResource always returns the reference to the |
| +// initially given bitmap, regardless of whether the resquest was because of |
|
aelias_OOO_until_Jul13
2013/08/30 06:20:41
typo: "resquest"
powei
2013/09/03 23:36:05
Done.
|
| +// lost resource or not. |
| class CC_EXPORT ScopedUIResource : public UIResourceClient { |
| public: |
| static scoped_ptr<ScopedUIResource> Create( |
| @@ -22,6 +28,7 @@ class CC_EXPORT ScopedUIResource : public UIResourceClient { |
| scoped_refptr<UIResourceBitmap> bitmap); |
| virtual ~ScopedUIResource(); |
| + // UIResourceClient implementation. |
| virtual scoped_refptr<UIResourceBitmap> GetBitmap( |
| UIResourceId uid, |
| bool resource_lost) OVERRIDE; |