forked from firka/flutter
Initialize members and check for nullptr (flutter/engine#30941)
This commit is contained in:
@@ -64,8 +64,11 @@ SkCanvas* ShellTestExternalViewEmbedder::CompositeEmbeddedView(int view_id) {
|
||||
void ShellTestExternalViewEmbedder::SubmitFrame(
|
||||
GrDirectContext* context,
|
||||
std::unique_ptr<SurfaceFrame> frame) {
|
||||
if (!frame) {
|
||||
return;
|
||||
}
|
||||
frame->Submit();
|
||||
if (frame && frame->SkiaSurface()) {
|
||||
if (frame->SkiaSurface()) {
|
||||
last_submitted_frame_size_ = SkISize::Make(frame->SkiaSurface()->width(),
|
||||
frame->SkiaSurface()->height());
|
||||
} else {
|
||||
|
||||
@@ -75,7 +75,7 @@ class EmbedderTaskRunner final : public fml::TaskRunner {
|
||||
const size_t embedder_identifier_;
|
||||
DispatchTable dispatch_table_;
|
||||
std::mutex tasks_mutex_;
|
||||
uint64_t last_baton_;
|
||||
uint64_t last_baton_ = 0;
|
||||
std::unordered_map<uint64_t, fml::closure> pending_tasks_;
|
||||
fml::TaskQueueId placeholder_id_;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class TextInputPlugin : public KeyboardHookHandler {
|
||||
std::unique_ptr<flutter::MethodChannel<rapidjson::Document>> channel_;
|
||||
|
||||
// The active client id.
|
||||
int client_id_;
|
||||
int client_id_ = 0;
|
||||
|
||||
// The active model. nullptr if not set.
|
||||
std::unique_ptr<TextInputModel> active_model_;
|
||||
|
||||
Reference in New Issue
Block a user