2018-11-12 19:59:29 -08:00
|
|
|
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
#include "flutter/flow/embedded_views.h"
|
|
|
|
|
|
2019-04-17 14:38:45 -07:00
|
|
|
namespace flutter {
|
2018-11-12 19:59:29 -08:00
|
|
|
|
|
|
|
|
bool ExternalViewEmbedder::SubmitFrame(GrContext* context) {
|
|
|
|
|
return false;
|
|
|
|
|
};
|
2019-06-25 15:29:47 -07:00
|
|
|
|
2019-07-03 11:18:14 -07:00
|
|
|
void MutatorsStack::PushClipRect(const SkRect& rect) {
|
2019-06-25 15:29:47 -07:00
|
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rect);
|
|
|
|
|
vector_.push_back(element);
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-03 11:18:14 -07:00
|
|
|
void MutatorsStack::PushClipRRect(const SkRRect& rrect) {
|
2019-06-25 15:29:47 -07:00
|
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rrect);
|
|
|
|
|
vector_.push_back(element);
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-03 11:18:14 -07:00
|
|
|
void MutatorsStack::PushClipPath(const SkPath& path) {
|
2019-07-02 10:56:59 -07:00
|
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(path);
|
|
|
|
|
vector_.push_back(element);
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-03 11:18:14 -07:00
|
|
|
void MutatorsStack::PushTransform(const SkMatrix& matrix) {
|
2019-06-25 15:29:47 -07:00
|
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(matrix);
|
|
|
|
|
vector_.push_back(element);
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-08 16:07:39 -07:00
|
|
|
void MutatorsStack::PushOpacity(const int& alpha) {
|
|
|
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(alpha);
|
|
|
|
|
vector_.push_back(element);
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-03 11:18:14 -07:00
|
|
|
void MutatorsStack::Pop() {
|
2019-06-25 15:29:47 -07:00
|
|
|
vector_.pop_back();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator
|
2019-07-03 11:18:14 -07:00
|
|
|
MutatorsStack::Top() const {
|
2019-06-25 15:29:47 -07:00
|
|
|
return vector_.rend();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator
|
2019-07-03 11:18:14 -07:00
|
|
|
MutatorsStack::Bottom() const {
|
2019-06-25 15:29:47 -07:00
|
|
|
return vector_.rbegin();
|
|
|
|
|
};
|
|
|
|
|
|
2019-04-17 14:38:45 -07:00
|
|
|
} // namespace flutter
|