Chromium Code Reviews| Index: cc/resource_provider.h |
| diff --git a/cc/resource_provider.h b/cc/resource_provider.h |
| index 6262d316c1023c745ba097aee76f0645292cb501..d79439f80fc6d620ce29bec544d66d7f7b926ce0 100644 |
| --- a/cc/resource_provider.h |
| +++ b/cc/resource_provider.h |
| @@ -11,6 +11,7 @@ |
| #include "cc/cc_export.h" |
| #include "cc/graphics_context.h" |
| #include "cc/texture_copier.h" |
| +#include "cc/transferable_resource.h" |
| #include "third_party/khronos/GLES2/gl2.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| #include "third_party/skia/include/core/SkCanvas.h" |
| @@ -43,28 +44,12 @@ public: |
| GLTexture = 1, |
| Bitmap, |
| }; |
| - struct Mailbox { |
| - GLbyte name[64]; |
| - }; |
| - struct TransferableResource { |
| - unsigned id; |
| - GLenum format; |
| - gfx::Size size; |
| - Mailbox mailbox; |
| - }; |
| - typedef std::vector<TransferableResource> TransferableResourceArray; |
| - struct CC_EXPORT TransferableResourceList { |
| - TransferableResourceList(); |
| - ~TransferableResourceList(); |
| - |
| - TransferableResourceArray resources; |
| - unsigned syncPoint; |
| - }; |
| static scoped_ptr<ResourceProvider> create(GraphicsContext*); |
| virtual ~ResourceProvider(); |
| + GraphicsContext* context() const { return m_context; } |
|
danakj
2012/11/03 01:00:51
Why'd you add this one? I don't see any users.
piman
2012/11/03 01:05:47
Done.
|
| WebKit::WebGraphicsContext3D* graphicsContext3D(); |
| TextureCopier* textureCopier() const { return m_textureCopier.get(); } |
| int maxTextureSize() const { return m_maxTextureSize; } |
| @@ -122,16 +107,16 @@ public: |
| // Prepares resources to be transfered to the parent, moving them to |
| // mailboxes and serializing meta-data into TransferableResources. |
| - // Resources are not removed from the ResourceProvider, but are markes as |
| + // Resources are not removed from the ResourceProvider, but are marked as |
| // "in use". |
| - TransferableResourceList prepareSendToParent(const ResourceIdArray&); |
| + void prepareSendToParent(const ResourceIdArray&, TransferableResourceList*); |
| // Prepares resources to be transfered back to the child, moving them to |
| // mailboxes and serializing meta-data into TransferableResources. |
| // Resources are removed from the ResourceProvider. Note: the resource IDs |
| // passed are in the parent namespace and will be translated to the child |
| // namespace when returned. |
| - TransferableResourceList prepareSendToChild(int child, const ResourceIdArray&); |
| + void prepareSendToChild(int child, const ResourceIdArray&, TransferableResourceList*); |
| // Receives resources from a child, moving them from mailboxes. Resource IDs |
| // passed are in the child namespace, and will be translated to the parent |