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

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

Issue 462983003: [WIP] Implement BackGroundFilter as seperate layer in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/background_filter_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_LAYERS_BACKGROUND_FILTER_LAYER_H_
6 #define CC_LAYERS_BACKGROUND_FILTER_LAYER_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/layers/layer.h"
10
11 class FilterOperations;
12
13 namespace cc {
14
15 // A Layer that applies a filter effect to the background.
16 // The filter is specified by using SetBackgroundFilters() on the base class.
17 class CC_EXPORT BackgroundFilterLayer : public Layer {
18 public:
19 static scoped_refptr<BackgroundFilterLayer> Create();
20
21 virtual scoped_ptr<LayerImpl> CreateLayerImpl(
22 LayerTreeImpl* tree_impl) OVERRIDE;
23
24 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
25
26 void SetBackgroundFilters(const FilterOperations& filters);
27
28 void ApplyFilterAtRect(gfx::Rect src_filter_rect);
29
30 void DrawFilteredBackgroundAtRect(gfx::Rect draw_filter_rect);
31
32 protected:
33 BackgroundFilterLayer();
34
35 private:
36 virtual ~BackgroundFilterLayer();
37 gfx::Rect src_filter_rect_;
38 gfx::Rect draw_filter_rect_;
39 FilterOperations filter_operations_;
40
41 DISALLOW_COPY_AND_ASSIGN(BackgroundFilterLayer);
42 };
43
44 } // namespace cc
45 #endif // CC_LAYERS_BACKGROUND_FILTER_LAYER_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/background_filter_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698