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

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

Issue 16211002: Skip drawing unsupported layers in forced software mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cc_unittests Created 7 years, 6 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 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 15
16 class CC_EXPORT TextureLayerImpl : public LayerImpl { 16 class CC_EXPORT TextureLayerImpl : public LayerImpl {
17 public: 17 public:
18 static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl, 18 static scoped_ptr<TextureLayerImpl> Create(LayerTreeImpl* tree_impl,
19 int id, 19 int id,
20 bool uses_mailbox) { 20 bool uses_mailbox) {
21 return make_scoped_ptr(new TextureLayerImpl(tree_impl, id, uses_mailbox)); 21 return make_scoped_ptr(new TextureLayerImpl(tree_impl, id, uses_mailbox));
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)
26 OVERRIDE; 26 OVERRIDE;
27 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 27 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
28 28
29 virtual void WillDraw(ResourceProvider* resource_provider) OVERRIDE; 29 virtual bool WillDraw(DrawMode draw_mode,
30 ResourceProvider* resource_provider) OVERRIDE;
30 virtual void AppendQuads(QuadSink* quad_sink, 31 virtual void AppendQuads(QuadSink* quad_sink,
31 AppendQuadsData* append_quads_data) OVERRIDE; 32 AppendQuadsData* append_quads_data) OVERRIDE;
32 virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE; 33 virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE;
33 34
34 virtual void DidLoseOutputSurface() OVERRIDE; 35 virtual void DidLoseOutputSurface() OVERRIDE;
35 36
36 virtual void DumpLayerProperties(std::string* str, int indent) const OVERRIDE; 37 virtual void DumpLayerProperties(std::string* str, int indent) const OVERRIDE;
37 virtual void DidBecomeActive() OVERRIDE; 38 virtual void DidBecomeActive() OVERRIDE;
38 39
39 unsigned texture_id() const { return texture_id_; } 40 unsigned texture_id() const { return texture_id_; }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 TextureMailbox texture_mailbox_; 79 TextureMailbox texture_mailbox_;
79 bool uses_mailbox_; 80 bool uses_mailbox_;
80 bool own_mailbox_; 81 bool own_mailbox_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(TextureLayerImpl); 83 DISALLOW_COPY_AND_ASSIGN(TextureLayerImpl);
83 }; 84 };
84 85
85 } // namespace cc 86 } // namespace cc
86 87
87 #endif // CC_LAYERS_TEXTURE_LAYER_IMPL_H_ 88 #endif // CC_LAYERS_TEXTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698