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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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/layers/surface_layer_unittest.cc ('k') | cc/layers/texture_layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_H_ 5 #ifndef CC_LAYERS_TEXTURE_LAYER_H_
6 #define CC_LAYERS_TEXTURE_LAYER_H_ 6 #define CC_LAYERS_TEXTURE_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // ReturnAndReleaseOnImplThread() defines their values. 84 // ReturnAndReleaseOnImplThread() defines their values.
85 base::Lock arguments_lock_; 85 base::Lock arguments_lock_;
86 gpu::SyncToken sync_token_; 86 gpu::SyncToken sync_token_;
87 bool is_lost_; 87 bool is_lost_;
88 base::ThreadChecker main_thread_checker_; 88 base::ThreadChecker main_thread_checker_;
89 DISALLOW_COPY_AND_ASSIGN(TextureMailboxHolder); 89 DISALLOW_COPY_AND_ASSIGN(TextureMailboxHolder);
90 }; 90 };
91 91
92 // Used when mailbox names are specified instead of texture IDs. 92 // Used when mailbox names are specified instead of texture IDs.
93 static scoped_refptr<TextureLayer> CreateForMailbox( 93 static scoped_refptr<TextureLayer> CreateForMailbox(
94 const LayerSettings& settings,
95 TextureLayerClient* client); 94 TextureLayerClient* client);
96 95
97 // Resets the client, which also resets the texture. 96 // Resets the client, which also resets the texture.
98 void ClearClient(); 97 void ClearClient();
99 98
100 // Resets the texture. 99 // Resets the texture.
101 void ClearTexture(); 100 void ClearTexture();
102 101
103 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 102 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
104 103
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // TODO(danakj): Remove this when pepper doesn't need it. crbug.com/350204 138 // TODO(danakj): Remove this when pepper doesn't need it. crbug.com/350204
140 void SetTextureMailboxWithoutReleaseCallback(const TextureMailbox& mailbox); 139 void SetTextureMailboxWithoutReleaseCallback(const TextureMailbox& mailbox);
141 140
142 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override; 141 void SetNeedsDisplayRect(const gfx::Rect& dirty_rect) override;
143 142
144 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override; 143 void SetLayerTreeHost(LayerTreeHost* layer_tree_host) override;
145 bool Update() override; 144 bool Update() override;
146 void PushPropertiesTo(LayerImpl* layer) override; 145 void PushPropertiesTo(LayerImpl* layer) override;
147 146
148 protected: 147 protected:
149 TextureLayer(const LayerSettings& settings, TextureLayerClient* client); 148 explicit TextureLayer(TextureLayerClient* client);
150 ~TextureLayer() override; 149 ~TextureLayer() override;
151 bool HasDrawableContent() const override; 150 bool HasDrawableContent() const override;
152 151
153 private: 152 private:
154 void SetTextureMailboxInternal( 153 void SetTextureMailboxInternal(
155 const TextureMailbox& mailbox, 154 const TextureMailbox& mailbox,
156 scoped_ptr<SingleReleaseCallback> release_callback, 155 scoped_ptr<SingleReleaseCallback> release_callback,
157 bool requires_commit, 156 bool requires_commit,
158 bool allow_mailbox_reuse); 157 bool allow_mailbox_reuse);
159 158
160 TextureLayerClient* client_; 159 TextureLayerClient* client_;
161 160
162 bool flipped_; 161 bool flipped_;
163 bool nearest_neighbor_; 162 bool nearest_neighbor_;
164 gfx::PointF uv_top_left_; 163 gfx::PointF uv_top_left_;
165 gfx::PointF uv_bottom_right_; 164 gfx::PointF uv_bottom_right_;
166 // [bottom left, top left, top right, bottom right] 165 // [bottom left, top left, top right, bottom right]
167 float vertex_opacity_[4]; 166 float vertex_opacity_[4];
168 bool premultiplied_alpha_; 167 bool premultiplied_alpha_;
169 bool blend_background_color_; 168 bool blend_background_color_;
170 169
171 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_; 170 scoped_ptr<TextureMailboxHolder::MainThreadReference> holder_ref_;
172 bool needs_set_mailbox_; 171 bool needs_set_mailbox_;
173 172
174 DISALLOW_COPY_AND_ASSIGN(TextureLayer); 173 DISALLOW_COPY_AND_ASSIGN(TextureLayer);
175 }; 174 };
176 175
177 } // namespace cc 176 } // namespace cc
178 #endif // CC_LAYERS_TEXTURE_LAYER_H_ 177 #endif // CC_LAYERS_TEXTURE_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/surface_layer_unittest.cc ('k') | cc/layers/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698