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

Side by Side Diff: cc/quads/filter_draw_quad.cc

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/quads/filter_draw_quad.h ('k') | cc/quads/render_pass.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 #include "cc/quads/filter_draw_quad.h"
6
7 #include "base/debug/trace_event_argument.h"
8 #include "cc/output/filter_operations.h"
9 #include "base/logging.h"
10 #include "base/values.h"
11
12 namespace cc {
13
14 FilterDrawQuad::FilterDrawQuad() {
15 }
16
17 void FilterDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
18 const gfx::Rect& visible_rect,
19 const gfx::Rect& src_rect,
20 const gfx::Rect& dst_draw_rect,
21 const FilterOperations& background_filters) {
22 SetAll(shared_quad_state,
23 rect,
24 opaque_rect,
25 visible_rect,
26 needs_blending,
27 src_rect,
28 dst_draw_rect,
29 background_filters);
30 }
31
32 void FilterDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
33 const gfx::Rect& rect,
34 const gfx::Rect& opaque_rect,
35 const gfx::Rect& visible_rect,
36 bool needs_blending,
37 const gfx::Rect& src_rect,
38 const gfx::Rect& dst_draw_rect,
39 const FilterOperations& background_filters) {
40 DrawQuad::SetAll(shared_quad_state,
41 DrawQuad::FILTER_CONTENT,
42 rect,
43 opaque_rect,
44 visible_rect,
45 needs_blending);
46 this->src_filter_rect_ = src_rect;
47 this->draw_filter_rect_ = dst_draw_rect;
48 this->filter_operations_ = background_filters;
49 }
50
51 void FilterDrawQuad::IterateResources(
52 const ResourceIteratorCallback& callback) {
53 }
54
55 const FilterDrawQuad* FilterDrawQuad::MaterialCast(const DrawQuad* quad) {
56 DCHECK(quad->material == DrawQuad::FILTER_CONTENT);
57 return static_cast<const FilterDrawQuad*>(quad);
58 }
59
60 void FilterDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
61 }
62
63 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/filter_draw_quad.h ('k') | cc/quads/render_pass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698