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

Side by Side Diff: cc/layers/texture_layer_impl.h

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 6 years, 3 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
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/layers/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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYERS_TEXTURE_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_TEXTURE_LAYER_IMPL_H_
6 #define CC_LAYERS_TEXTURE_LAYER_IMPL_H_ 6 #define CC_LAYERS_TEXTURE_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/layers/layer_impl.h" 12 #include "cc/layers/layer_impl.h"
13 13
14 namespace cc { 14 namespace cc {
15 class SingleReleaseCallback; 15 class SingleReleaseCallbackImpl;
16 class ScopedResource; 16 class ScopedResource;
17 17
18 class CC_EXPORT TextureLayerImpl : public LayerImpl { 18 class CC_EXPORT TextureLayerImpl : public LayerImpl {
19 public: 19 public:
20 static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { 20 static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
21 return make_scoped_ptr(new TextureLayerImpl(tree_impl, id)); 21 return make_scoped_ptr(new TextureLayerImpl(tree_impl, id));
22 } 22 }
23 virtual ~TextureLayerImpl(); 23 virtual ~TextureLayerImpl();
24 24
25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* layer_tree_impl) 25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* layer_tree_impl)
(...skipping 16 matching lines...) Expand all
42 void SetBlendBackgroundColor(bool blend); 42 void SetBlendBackgroundColor(bool blend);
43 void SetFlipped(bool flipped); 43 void SetFlipped(bool flipped);
44 void SetUVTopLeft(const gfx::PointF top_left); 44 void SetUVTopLeft(const gfx::PointF top_left);
45 void SetUVBottomRight(const gfx::PointF bottom_right); 45 void SetUVBottomRight(const gfx::PointF bottom_right);
46 46
47 // 1--2 47 // 1--2
48 // | | 48 // | |
49 // 0--3 49 // 0--3
50 void SetVertexOpacity(const float vertex_opacity[4]); 50 void SetVertexOpacity(const float vertex_opacity[4]);
51 51
52 void SetTextureMailbox(const TextureMailbox& mailbox, 52 void SetTextureMailbox(
53 scoped_ptr<SingleReleaseCallback> release_callback); 53 const TextureMailbox& mailbox,
54 scoped_ptr<SingleReleaseCallbackImpl> release_callback);
54 55
55 private: 56 private:
56 TextureLayerImpl(LayerTreeImpl* tree_impl, int id); 57 TextureLayerImpl(LayerTreeImpl* tree_impl, int id);
57 58
58 virtual const char* LayerTypeAsString() const OVERRIDE; 59 virtual const char* LayerTypeAsString() const OVERRIDE;
59 void FreeTextureMailbox(); 60 void FreeTextureMailbox();
60 61
61 ResourceProvider::ResourceId external_texture_resource_; 62 ResourceProvider::ResourceId external_texture_resource_;
62 bool premultiplied_alpha_; 63 bool premultiplied_alpha_;
63 bool blend_background_color_; 64 bool blend_background_color_;
64 bool flipped_; 65 bool flipped_;
65 gfx::PointF uv_top_left_; 66 gfx::PointF uv_top_left_;
66 gfx::PointF uv_bottom_right_; 67 gfx::PointF uv_bottom_right_;
67 float vertex_opacity_[4]; 68 float vertex_opacity_[4];
68 // This is a resource that's a GL copy of a software texture mailbox. 69 // This is a resource that's a GL copy of a software texture mailbox.
69 scoped_ptr<ScopedResource> texture_copy_; 70 scoped_ptr<ScopedResource> texture_copy_;
70 71
71 TextureMailbox texture_mailbox_; 72 TextureMailbox texture_mailbox_;
72 scoped_ptr<SingleReleaseCallback> release_callback_; 73 scoped_ptr<SingleReleaseCallbackImpl> release_callback_;
73 bool own_mailbox_; 74 bool own_mailbox_;
74 bool valid_texture_copy_; 75 bool valid_texture_copy_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(TextureLayerImpl); 77 DISALLOW_COPY_AND_ASSIGN(TextureLayerImpl);
77 }; 78 };
78 79
79 } // namespace cc 80 } // namespace cc
80 81
81 #endif // CC_LAYERS_TEXTURE_LAYER_IMPL_H_ 82 #endif // CC_LAYERS_TEXTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698