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

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

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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_external_bitmap_impl.cc ('k') | cc/blink/web_external_texture_layer_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_TEXTURE_LAYER_IMPL_H_
6 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
7
8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h"
11 #include "cc/blink/cc_blink_export.h"
12 #include "cc/layers/texture_layer_client.h"
13 #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
14
15 namespace blink {
16 class WebExternalTextureLayerClient;
17 struct WebFloatRect;
18 struct WebExternalTextureMailbox;
19 }
20
21 namespace cc {
22 class SingleReleaseCallback;
23 class TextureMailbox;
24 }
25
26 namespace cc_blink {
27
28 class WebLayerImpl;
29 class WebExternalBitmapImpl;
30
31 class WebExternalTextureLayerImpl
32 : public blink::WebExternalTextureLayer,
33 public cc::TextureLayerClient,
34 public base::SupportsWeakPtr<WebExternalTextureLayerImpl> {
35 public:
36 CC_BLINK_EXPORT explicit WebExternalTextureLayerImpl(
37 blink::WebExternalTextureLayerClient*);
38 virtual ~WebExternalTextureLayerImpl();
39
40 // blink::WebExternalTextureLayer implementation.
41 virtual blink::WebLayer* layer();
42 virtual void clearTexture();
43 virtual void setOpaque(bool opaque);
44 virtual void setPremultipliedAlpha(bool premultiplied);
45 virtual void setBlendBackgroundColor(bool blend);
46 virtual void setRateLimitContext(bool rate_limit);
47 virtual void setNearestNeighbor(bool nearest_neighbor);
48
49 // TextureLayerClient implementation.
50 bool PrepareTextureMailbox(
51 cc::TextureMailbox* mailbox,
52 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
53 bool use_shared_memory) override;
54
55 private:
56 static void DidReleaseMailbox(
57 base::WeakPtr<WebExternalTextureLayerImpl> layer,
58 const blink::WebExternalTextureMailbox& mailbox,
59 WebExternalBitmapImpl* bitmap,
60 unsigned sync_point,
61 bool lost_resource);
62
63 WebExternalBitmapImpl* AllocateBitmap();
64
65 blink::WebExternalTextureLayerClient* client_;
66 scoped_ptr<WebLayerImpl> layer_;
67 ScopedVector<WebExternalBitmapImpl> free_bitmaps_;
68
69 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl);
70 };
71
72 } // namespace cc_blink
73
74 #endif // CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/blink/web_external_bitmap_impl.cc ('k') | cc/blink/web_external_texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698