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

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

Issue 13126002: TextureLayer: clear texture id when clearing client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add SetNeedsDisplay Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 11 matching lines...) Expand all
22 class CC_EXPORT TextureLayer : public Layer { 22 class CC_EXPORT TextureLayer : public Layer {
23 public: 23 public:
24 // If this texture layer requires special preparation logic for each frame 24 // If this texture layer requires special preparation logic for each frame
25 // driven by the compositor, pass in a non-nil client. Pass in a nil client 25 // driven by the compositor, pass in a non-nil client. Pass in a nil client
26 // pointer if texture updates are driven by an external process. 26 // pointer if texture updates are driven by an external process.
27 static scoped_refptr<TextureLayer> Create(TextureLayerClient* client); 27 static scoped_refptr<TextureLayer> Create(TextureLayerClient* client);
28 28
29 // Used when mailbox names are specified instead of texture IDs. 29 // Used when mailbox names are specified instead of texture IDs.
30 static scoped_refptr<TextureLayer> CreateForMailbox(); 30 static scoped_refptr<TextureLayer> CreateForMailbox();
31 31
32 void ClearClient() { client_ = NULL; } 32 void ClearClient();
33 33
34 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 34 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
35 OVERRIDE; 35 OVERRIDE;
36 36
37 // Sets whether this texture should be Y-flipped at draw time. Defaults to 37 // Sets whether this texture should be Y-flipped at draw time. Defaults to
38 // true. 38 // true.
39 void SetFlipped(bool flipped); 39 void SetFlipped(bool flipped);
40 40
41 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). 41 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1).
42 void SetUV(gfx::PointF top_left, gfx::PointF bottom_right); 42 void SetUV(gfx::PointF top_left, gfx::PointF bottom_right);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 unsigned texture_id_; 98 unsigned texture_id_;
99 TextureMailbox texture_mailbox_; 99 TextureMailbox texture_mailbox_;
100 bool own_mailbox_; 100 bool own_mailbox_;
101 101
102 DISALLOW_COPY_AND_ASSIGN(TextureLayer); 102 DISALLOW_COPY_AND_ASSIGN(TextureLayer);
103 }; 103 };
104 104
105 } // namespace cc 105 } // namespace cc
106 #endif // CC_LAYERS_TEXTURE_LAYER_H_ 106 #endif // CC_LAYERS_TEXTURE_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698