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

Side by Side Diff: cc/blink/web_external_bitmap_impl.h

Issue 2261623002: Make DrawingBuffer and Canvas2DLayerBridge be cc::TextureLayerClients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webmailbox: fix-passrefptr Created 4 years, 4 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
« no previous file with comments | « cc/blink/web_compositor_support_impl.cc ('k') | cc/blink/web_external_bitmap_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_
6 #define CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/bind.h"
13 #include "base/macros.h"
14 #include "cc/blink/cc_blink_export.h"
15 #include "third_party/WebKit/public/platform/WebExternalBitmap.h"
16
17 namespace cc {
18 class SharedBitmap;
19 }
20
21 namespace cc_blink {
22
23 typedef std::unique_ptr<cc::SharedBitmap> (*SharedBitmapAllocationFunction)(
24 const gfx::Size& size);
25
26 // Sets the function that this will use to allocate shared memory.
27 CC_BLINK_EXPORT void SetSharedBitmapAllocationFunction(
28 SharedBitmapAllocationFunction);
29
30 class WebExternalBitmapImpl : public blink::WebExternalBitmap {
31 public:
32 CC_BLINK_EXPORT explicit WebExternalBitmapImpl();
33 virtual ~WebExternalBitmapImpl();
34
35 // blink::WebExternalBitmap implementation.
36 blink::WebSize size() override;
37 void setSize(blink::WebSize size) override;
38 uint8_t* pixels() override;
39
40 cc::SharedBitmap* shared_bitmap() { return shared_bitmap_.get(); }
41
42 private:
43 std::unique_ptr<cc::SharedBitmap> shared_bitmap_;
44 blink::WebSize size_;
45
46 DISALLOW_COPY_AND_ASSIGN(WebExternalBitmapImpl);
47 };
48
49 } // namespace cc_blink
50
51 #endif // CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_
OLDNEW
« no previous file with comments | « cc/blink/web_compositor_support_impl.cc ('k') | cc/blink/web_external_bitmap_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698