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

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

Issue 23530003: cc: Block commit on activate by setting a flag on LayerTreeHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Sets whether the texture should be blended with the background color 60 // Sets whether the texture should be blended with the background color
61 // at draw time. Defaults to false. 61 // at draw time. Defaults to false.
62 void SetBlendBackgroundColor(bool blend); 62 void SetBlendBackgroundColor(bool blend);
63 63
64 // Sets whether this context should rate limit on damage to prevent too many 64 // Sets whether this context should rate limit on damage to prevent too many
65 // frames from being queued up before the compositor gets a chance to run. 65 // frames from being queued up before the compositor gets a chance to run.
66 // Requires a non-nil client. Defaults to false. 66 // Requires a non-nil client. Defaults to false.
67 void SetRateLimitContext(bool rate_limit); 67 void SetRateLimitContext(bool rate_limit);
68 68
69 // Code path for plugins which supply their own texture ID. 69 // Code path for plugins which supply their own texture ID.
70 // DEPRECATED. DO NOT USE.
70 void SetTextureId(unsigned texture_id); 71 void SetTextureId(unsigned texture_id);
71 72
72 // Code path for plugins which supply their own mailbox. 73 // Code path for plugins which supply their own mailbox.
73 bool uses_mailbox() const { return uses_mailbox_; } 74 bool uses_mailbox() const { return uses_mailbox_; }
74 void SetTextureMailbox(const TextureMailbox& mailbox); 75 void SetTextureMailbox(const TextureMailbox& mailbox);
75 76
76 void WillModifyTexture(); 77 void WillModifyTexture();
77 78
78 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; 79 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE;
79 80
80 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; 81 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE;
81 virtual bool DrawsContent() const OVERRIDE; 82 virtual bool DrawsContent() const OVERRIDE;
82 virtual bool Update(ResourceUpdateQueue* queue, 83 virtual bool Update(ResourceUpdateQueue* queue,
83 const OcclusionTracker* occlusion) OVERRIDE; 84 const OcclusionTracker* occlusion) OVERRIDE;
84 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 85 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
85 virtual Region VisibleContentOpaqueRegion() const OVERRIDE; 86 virtual Region VisibleContentOpaqueRegion() const OVERRIDE;
86 virtual bool BlocksPendingCommit() const OVERRIDE;
87 87
88 virtual bool CanClipSelf() const OVERRIDE; 88 virtual bool CanClipSelf() const OVERRIDE;
89 89
90 protected: 90 protected:
91 TextureLayer(TextureLayerClient* client, bool uses_mailbox); 91 TextureLayer(TextureLayerClient* client, bool uses_mailbox);
92 virtual ~TextureLayer(); 92 virtual ~TextureLayer();
93 93
94 private: 94 private:
95 class MailboxHolder : public base::RefCountedThreadSafe<MailboxHolder> { 95 class MailboxHolder : public base::RefCountedThreadSafe<MailboxHolder> {
96 public: 96 public:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 unsigned texture_id_; 152 unsigned texture_id_;
153 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; 153 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_;
154 bool needs_set_mailbox_; 154 bool needs_set_mailbox_;
155 155
156 DISALLOW_COPY_AND_ASSIGN(TextureLayer); 156 DISALLOW_COPY_AND_ASSIGN(TextureLayer);
157 }; 157 };
158 158
159 } // namespace cc 159 } // namespace cc
160 #endif // CC_LAYERS_TEXTURE_LAYER_H_ 160 #endif // CC_LAYERS_TEXTURE_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698