| OLD | NEW |
| 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 Loading... |
| 60 | 60 |
| 61 // Code path for plugins which supply their own texture ID. | 61 // Code path for plugins which supply their own texture ID. |
| 62 void SetTextureId(unsigned texture_id); | 62 void SetTextureId(unsigned texture_id); |
| 63 | 63 |
| 64 // Code path for plugins which supply their own mailbox. | 64 // Code path for plugins which supply their own mailbox. |
| 65 bool uses_mailbox() const { return uses_mailbox_; } | 65 bool uses_mailbox() const { return uses_mailbox_; } |
| 66 void SetTextureMailbox(const TextureMailbox& mailbox); | 66 void SetTextureMailbox(const TextureMailbox& mailbox); |
| 67 | 67 |
| 68 void WillModifyTexture(); | 68 void WillModifyTexture(); |
| 69 | 69 |
| 70 // Returns true if the layer must use a mailbox with shared memory or an |
| 71 // SkBitmap. |
| 72 bool MustUseBitmap(); |
| 73 |
| 70 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; | 74 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; |
| 71 | 75 |
| 72 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; | 76 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; |
| 73 virtual bool DrawsContent() const OVERRIDE; | 77 virtual bool DrawsContent() const OVERRIDE; |
| 74 virtual void Update(ResourceUpdateQueue* queue, | 78 virtual void Update(ResourceUpdateQueue* queue, |
| 75 const OcclusionTracker* occlusion, | 79 const OcclusionTracker* occlusion, |
| 76 RenderingStats* stats) OVERRIDE; | 80 RenderingStats* stats) OVERRIDE; |
| 77 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 81 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
| 78 virtual bool BlocksPendingCommit() const OVERRIDE; | 82 virtual bool BlocksPendingCommit() const OVERRIDE; |
| 79 | 83 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 120 |
| 117 unsigned texture_id_; | 121 unsigned texture_id_; |
| 118 scoped_refptr<MailboxHolder> holder_; | 122 scoped_refptr<MailboxHolder> holder_; |
| 119 bool needs_set_mailbox_; | 123 bool needs_set_mailbox_; |
| 120 | 124 |
| 121 DISALLOW_COPY_AND_ASSIGN(TextureLayer); | 125 DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
| 122 }; | 126 }; |
| 123 | 127 |
| 124 } // namespace cc | 128 } // namespace cc |
| 125 #endif // CC_LAYERS_TEXTURE_LAYER_H_ | 129 #endif // CC_LAYERS_TEXTURE_LAYER_H_ |
| OLD | NEW |