mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
// 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"
|
|
|
|
namespace flutter {
|
|
|
|
void ExternalViewEmbedder::SubmitFrame(
|
|
GrDirectContext* context,
|
|
std::unique_ptr<SurfaceFrame> frame,
|
|
const std::shared_ptr<fml::SyncSwitch>& gpu_disable_sync_switch) {
|
|
frame->Submit();
|
|
};
|
|
|
|
void MutatorsStack::PushClipRect(const SkRect& rect) {
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rect);
|
|
vector_.push_back(element);
|
|
};
|
|
|
|
void MutatorsStack::PushClipRRect(const SkRRect& rrect) {
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rrect);
|
|
vector_.push_back(element);
|
|
};
|
|
|
|
void MutatorsStack::PushClipPath(const SkPath& path) {
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(path);
|
|
vector_.push_back(element);
|
|
};
|
|
|
|
void MutatorsStack::PushTransform(const SkMatrix& matrix) {
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(matrix);
|
|
vector_.push_back(element);
|
|
};
|
|
|
|
void MutatorsStack::PushOpacity(const int& alpha) {
|
|
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(alpha);
|
|
vector_.push_back(element);
|
|
};
|
|
|
|
void MutatorsStack::Pop() {
|
|
vector_.pop_back();
|
|
};
|
|
|
|
const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator
|
|
MutatorsStack::Top() const {
|
|
return vector_.rend();
|
|
};
|
|
|
|
const std::vector<std::shared_ptr<Mutator>>::const_reverse_iterator
|
|
MutatorsStack::Bottom() const {
|
|
return vector_.rbegin();
|
|
};
|
|
|
|
const std::vector<std::shared_ptr<Mutator>>::const_iterator
|
|
MutatorsStack::Begin() const {
|
|
return vector_.begin();
|
|
};
|
|
|
|
const std::vector<std::shared_ptr<Mutator>>::const_iterator MutatorsStack::End()
|
|
const {
|
|
return vector_.end();
|
|
};
|
|
|
|
bool ExternalViewEmbedder::SupportsDynamicThreadMerging() {
|
|
return false;
|
|
}
|
|
|
|
} // namespace flutter
|