1 | // Copyright 2013 The Flutter 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 "flutter/flow/embedded_views.h" |
6 | |
7 | namespace flutter { |
8 | |
9 | void ExternalViewEmbedder::SubmitFrame(GrDirectContext* context, |
10 | std::unique_ptr<SurfaceFrame> frame) { |
11 | frame->Submit(); |
12 | }; |
13 | |
14 | void MutatorsStack::PushClipRect(const SkRect& rect) { |
15 | std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rect); |
16 | vector_.push_back(element); |
17 | }; |
18 | |
19 | void MutatorsStack::PushClipRRect(const SkRRect& rrect) { |
20 | std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rrect); |
21 | vector_.push_back(element); |
22 | }; |
23 | |
24 | void MutatorsStack::PushClipPath(const SkPath& path) { |
25 | std::shared_ptr<Mutator> element = std::make_shared<Mutator>(path); |
26 | vector_.push_back(element); |
27 | }; |
28 | |
29 | void MutatorsStack::PushTransform(const SkMatrix& matrix) { |
30 | std::shared_ptr<Mutator> element = std::make_shared<Mutator>(matrix); |
31 | vector_.push_back(element); |
32 | }; |
33 | |
34 | void MutatorsStack::PushOpacity(const int& alpha) { |
35 | std::shared_ptr<Mutator> element = std::make_shared<Mutator>(alpha); |
36 | vector_.push_back(element); |
37 | }; |
38 | |
39 | void MutatorsStack::Pop() { |
40 | vector_.pop_back(); |
41 | }; |
42 | |
43 | const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator |
44 | MutatorsStack::Top() const { |
45 | return vector_.rend(); |
46 | }; |
47 | |
48 | const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator |
49 | MutatorsStack::Bottom() const { |
50 | return vector_.rbegin(); |
51 | }; |
52 | |
53 | const std::vector<std::shared_ptr<Mutator>>::const_iterator |
54 | MutatorsStack::Begin() const { |
55 | return vector_.begin(); |
56 | }; |
57 | |
58 | const std::vector<std::shared_ptr<Mutator>>::const_iterator MutatorsStack::End() |
59 | const { |
60 | return vector_.end(); |
61 | }; |
62 | |
63 | } // namespace flutter |
64 |