Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
500e60c
Define structs, class
yaakovschectman Feb 8, 2024
8dd4543
Define PV type registration runner API function
yaakovschectman Feb 8, 2024
ae0d049
Bare minimum PlatformViewHandler
yaakovschectman Feb 8, 2024
5f14af0
Compositor owns platform view manager
yaakovschectman Feb 8, 2024
200f13a
Set up for mocking
yaakovschectman Feb 8, 2024
ed90810
Add unit test
yaakovschectman Feb 13, 2024
5d410ff
Formatting
yaakovschectman Feb 13, 2024
484c8c1
License fix, await future
yaakovschectman Feb 13, 2024
b8fadd7
PR Feedback
yaakovschectman Feb 13, 2024
1d203f4
_internal header file
yaakovschectman Feb 14, 2024
b9acc1a
Wait to add manager to compositors
yaakovschectman Feb 14, 2024
35eb688
Rename fixture function
yaakovschectman Feb 14, 2024
659ebd6
Reorder parameters
yaakovschectman Feb 14, 2024
db2851b
Use constants
yaakovschectman Feb 14, 2024
db48ddd
Reorder params in test
yaakovschectman Feb 14, 2024
f87ed96
Format
yaakovschectman Feb 14, 2024
42f976e
License
yaakovschectman Feb 14, 2024
284b309
Break up PlatformViewManager
yaakovschectman Feb 16, 2024
e000930
PR Feedback
yaakovschectman Feb 16, 2024
676868f
Formatting
yaakovschectman Feb 16, 2024
6e6ef7e
PR Feedback
yaakovschectman Feb 16, 2024
22a9e46
Update shell/platform/windows/flutter_windows_engine_unittests.cc
yaakovschectman Feb 21, 2024
95a8498
Update shell/platform/windows/platform_view_manager.h
yaakovschectman Feb 21, 2024
1fa97f3
Update shell/platform/windows/public/flutter_windows.h
yaakovschectman Feb 21, 2024
5453b29
Update shell/platform/windows/flutter_windows_engine_unittests.cc
yaakovschectman Feb 21, 2024
dfa6b73
PR Feedback
yaakovschectman Feb 21, 2024
cde468e
Merge branch 'main' into win_pv_i
yaakovschectman Feb 21, 2024
585ca11
Include internal header
yaakovschectman Feb 22, 2024
54d91a3
Merge branch 'main' into win_pv_i
yaakovschectman Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR Feedback
  • Loading branch information
yaakovschectman committed Feb 21, 2024
commit dfa6b73bf0892d6b0f5f61e96770139a364cf8e4
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <memory>

#include "flutter/shell/platform/windows/flutter_windows_internal.h"
#include "flutter/shell/platform/windows/public/flutter_windows.h"

namespace flutter {
Expand Down
21 changes: 21 additions & 0 deletions shell/platform/windows/flutter_windows_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ extern "C" {
// Declare functions that are currently in-progress and shall be exposed to the
// public facing API upon completion.

typedef int64_t PlatformViewId;

typedef struct {
size_t struct_size;
HWND parent_window;
const char* platform_view_type;
// user_data may hold any necessary additional information for creating a new
// platform view. For example, an instance of FlutterWindow.
void* user_data;
PlatformViewId platform_view_id;
} FlutterPlatformViewCreationParameters;

typedef HWND (*FlutterPlatformViewFactory)(
const FlutterPlatformViewCreationParameters*);

typedef struct {
size_t struct_size;
FlutterPlatformViewFactory factory;
void* user_data; // Arbitrary user data supplied to the creation struct.
} FlutterPlatformViewTypeEntry;

FLUTTER_EXPORT void FlutterDesktopEngineRegisterPlatformViewType(
FlutterDesktopEngineRef engine,
const char* view_type_name,
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/windows/platform_view_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <memory>

#include "flutter/shell/platform/common/client_wrapper/include/flutter/method_channel.h"
#include "flutter/shell/platform/windows/public/flutter_windows.h"
#include "flutter/shell/platform/windows/flutter_windows_internal.h"
#include "flutter/shell/platform/windows/task_runner.h"

namespace flutter {
Expand Down
10 changes: 5 additions & 5 deletions shell/platform/windows/platform_view_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ class PlatformViewPlugin : public PlatformViewManager {
void RegisterPlatformViewType(std::string_view type_name,
const FlutterPlatformViewTypeEntry& type);

// | PlatformViewManager |
// type_name must correspond to a string that has already been registered
// with RegisterPlatformViewType.
bool AddPlatformView(PlatformViewId id, std::string_view type_name) override;

// Create a queued platform view instance after it has been added.
// id must correspond to an identifier that has already been added with
// AddPlatformView.
// This method will create the platform view within a task queued to the
// engine's TaskRunner, which will run on the UI thread.
void InstantiatePlatformView(PlatformViewId id);

// | PlatformViewManager |
// type_name must correspond to a string that has already been registered
// with RegisterPlatformViewType.
bool AddPlatformView(PlatformViewId id, std::string_view type_name) override;

// | PlatformViewManager |
// id must correspond to an identifier that has already been added with
// AddPlatformView.
Expand Down
21 changes: 0 additions & 21 deletions shell/platform/windows/public/flutter_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,27 +203,6 @@ FLUTTER_EXPORT void FlutterDesktopEngineSetNextFrameCallback(
VoidCallback callback,
void* user_data);

typedef int64_t PlatformViewId;

typedef struct {
size_t struct_size;
HWND parent_window;
const char* platform_view_type;
// user_data may hold any necessary additional information for creating a new
// platform view. For example, an instance of FlutterWindow.
void* user_data;
PlatformViewId platform_view_id;
} FlutterPlatformViewCreationParameters;

typedef HWND (*FlutterPlatformViewFactory)(
const FlutterPlatformViewCreationParameters*);

typedef struct {
size_t struct_size;
FlutterPlatformViewFactory factory;
void* user_data; // Arbitrary user data supplied to the creation struct.
} FlutterPlatformViewTypeEntry;

// ========== View ==========

// Return backing HWND for manipulation in host application.
Expand Down