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

Side by Side Diff: cc/layers/nine_patch_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: rebase on r203584 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_NINE_PATCH_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_
6 #define CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ 6 #define CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 virtual ~NinePatchLayerImpl(); 28 virtual ~NinePatchLayerImpl();
29 29
30 void SetResourceId(unsigned id) { resource_id_ = id; } 30 void SetResourceId(unsigned id) { resource_id_ = id; }
31 void SetLayout(gfx::Size image_bounds, gfx::Rect aperture); 31 void SetLayout(gfx::Size image_bounds, gfx::Rect aperture);
32 32
33 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 33 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
34 OVERRIDE; 34 OVERRIDE;
35 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 35 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
36 36
37 virtual bool WillDraw(DrawMode draw_mode,
38 ResourceProvider* resource_provider) OVERRIDE;
37 virtual void AppendQuads(QuadSink* quad_sink, 39 virtual void AppendQuads(QuadSink* quad_sink,
38 AppendQuadsData* append_quads_data) OVERRIDE; 40 AppendQuadsData* append_quads_data) OVERRIDE;
39 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; 41 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
40 virtual void DumpLayerProperties(std::string* str, int indent) const OVERRIDE; 42 virtual void DumpLayerProperties(std::string* str, int indent) const OVERRIDE;
41 virtual void DidLoseOutputSurface() OVERRIDE; 43 virtual void DidLoseOutputSurface() OVERRIDE;
42 44
43 virtual base::DictionaryValue* LayerTreeAsJson() const OVERRIDE; 45 virtual base::DictionaryValue* LayerTreeAsJson() const OVERRIDE;
44 46
45 protected: 47 protected:
46 NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id); 48 NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id);
47 49
48 private: 50 private:
49 virtual const char* LayerTypeAsString() const OVERRIDE; 51 virtual const char* LayerTypeAsString() const OVERRIDE;
50 52
51 // The size of the NinePatch bitmap in pixels. 53 // The size of the NinePatch bitmap in pixels.
52 gfx::Size image_bounds_; 54 gfx::Size image_bounds_;
53 55
54 // The transparent center region that shows the parent layer's contents in 56 // The transparent center region that shows the parent layer's contents in
55 // image space. 57 // image space.
56 gfx::Rect image_aperture_; 58 gfx::Rect image_aperture_;
57 59
58 ResourceProvider::ResourceId resource_id_; 60 ResourceProvider::ResourceId resource_id_;
59 61
60 DISALLOW_COPY_AND_ASSIGN(NinePatchLayerImpl); 62 DISALLOW_COPY_AND_ASSIGN(NinePatchLayerImpl);
61 }; 63 };
62 64
63 } // namespace cc 65 } // namespace cc
64 66
65 #endif // CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ 67 #endif // CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698