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

Side by Side Diff: webkit/renderer/compositor_bindings/web_external_bitmap_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: use ShareMemory path 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_
7
8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/WebKit/public/platform/WebExternalBitmap.h"
11 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export. h"
12
13 namespace base {
14 class SharedMemory;
15 }
16
17 namespace webkit {
18
19 typedef scoped_ptr<base::SharedMemory> (*SharedMemoryAllocationFunction)(
20 size_t);
21
22 // Sets the function that this will use to allocate shared memory.
23 void SetSharedMemoryAllocationFunction(SharedMemoryAllocationFunction);
24
25 class WebExternalBitmapImpl : public WebKit::WebExternalBitmap {
26 public:
27 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebExternalBitmapImpl();
28 virtual ~WebExternalBitmapImpl();
29
30 // WebKit::WebExternalBitmap implementation.
31 virtual WebKit::WebSize getSize() OVERRIDE;
32 virtual void setSize(WebKit::WebSize size) OVERRIDE;
33 virtual void* getPointer() OVERRIDE;
34
35 base::SharedMemory* getSharedMemory() { return shared_memory_.get(); }
36
37 private:
38 scoped_ptr<base::SharedMemory> shared_memory_;
39 WebKit::WebSize size_;
40
41 DISALLOW_COPY_AND_ASSIGN(WebExternalBitmapImpl);
42 };
43
44 } // namespace webkit
45
46 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698