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

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

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: Calculate mask layer opacity. Created 3 years, 7 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
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_SOLID_COLOR_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
6 #define CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_ 6 #define CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "cc/cc_export.h" 12 #include "cc/cc_export.h"
13 #include "cc/layers/layer.h"
13 #include "cc/layers/layer_impl.h" 14 #include "cc/layers/layer_impl.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class CC_EXPORT SolidColorLayerImpl : public LayerImpl { 18 class CC_EXPORT SolidColorLayerImpl : public LayerImpl {
18 public: 19 public:
19 static std::unique_ptr<SolidColorLayerImpl> Create(LayerTreeImpl* tree_impl, 20 static std::unique_ptr<SolidColorLayerImpl> Create(LayerTreeImpl* tree_impl,
20 int id) { 21 int id) {
21 return base::WrapUnique(new SolidColorLayerImpl(tree_impl, id)); 22 return base::WrapUnique(new SolidColorLayerImpl(tree_impl, id));
22 } 23 }
23 24
24 static void AppendSolidQuads(RenderPass* render_pass, 25 static void AppendSolidQuads(RenderPass* render_pass,
25 const Occlusion& occlusion_in_layer_space, 26 const Occlusion& occlusion_in_layer_space,
26 SharedQuadState* shared_quad_state, 27 SharedQuadState* shared_quad_state,
27 const gfx::Rect& visible_layer_rect, 28 const gfx::Rect& visible_layer_rect,
28 SkColor color, 29 SkColor color,
29 AppendQuadsData* append_quads_data); 30 AppendQuadsData* append_quads_data,
31 Layer::LayerMaskType mask_type);
30 32
31 ~SolidColorLayerImpl() override; 33 ~SolidColorLayerImpl() override;
32 34
33 // LayerImpl overrides. 35 // LayerImpl overrides.
34 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 36 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
35 void AppendQuads(RenderPass* render_pass, 37 void AppendQuads(RenderPass* render_pass,
36 AppendQuadsData* append_quads_data) override; 38 AppendQuadsData* append_quads_data) override;
37 39
38 protected: 40 protected:
39 SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id); 41 SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id);
40 42
41 private: 43 private:
42 const char* LayerTypeAsString() const override; 44 const char* LayerTypeAsString() const override;
43 45
44 DISALLOW_COPY_AND_ASSIGN(SolidColorLayerImpl); 46 DISALLOW_COPY_AND_ASSIGN(SolidColorLayerImpl);
45 }; 47 };
46 48
47 } // namespace cc 49 } // namespace cc
48 50
49 #endif // CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_ 51 #endif // CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698