Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h

Issue 17859002: Allow WebExternalTextureLayers to receive a bitmap along with a mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h
diff --git a/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h b/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h
index dfe75a64b698fc3c9991568f28a70cbf97195100..0a0ebf4777768ee8f2a7cfdda0416b03aaa9bf9d 100644
--- a/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h
+++ b/webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "cc/layers/texture_layer_client.h"
#include "cc/resources/texture_mailbox.h"
#include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
@@ -20,6 +21,7 @@ struct WebExternalTextureMailbox;
namespace webkit {
class WebLayerImpl;
+class WebExternalBitmapImpl;
class WebExternalTextureLayerImpl
: public WebKit::WebExternalTextureLayer,
@@ -46,16 +48,23 @@ class WebExternalTextureLayerImpl
// TextureLayerClient implementation.
virtual unsigned PrepareTexture(cc::ResourceUpdateQueue*) OVERRIDE;
virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
- virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE;
+ virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox,
+ bool use_shared_memory) OVERRIDE;
private:
- void DidReleaseMailbox(const WebKit::WebExternalTextureMailbox& mailbox,
- unsigned sync_point,
- bool lost_resource);
+ static void DidReleaseMailbox(
+ base::WeakPtr<WebExternalTextureLayerImpl> layer,
+ const WebKit::WebExternalTextureMailbox& mailbox,
+ WebExternalBitmapImpl* bitmap,
+ unsigned sync_point,
+ bool lost_resource);
+
+ WebExternalBitmapImpl* AllocateBitmap();
WebKit::WebExternalTextureLayerClient* client_;
scoped_ptr<WebLayerImpl> layer_;
bool uses_mailbox_;
+ ScopedVector<WebExternalBitmapImpl> free_bitmaps_;
DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698