Skip to content

Commit

Permalink
Cleanup some comments (flutter-tizen#226)
Browse files Browse the repository at this point in the history
* Cleanup comments

* Apply suggested changes

* Clarify which window returns
  • Loading branch information
HakkyuKim authored Dec 23, 2021
1 parent a20434c commit 87fab19
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions shell/platform/tizen/channels/window_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

namespace flutter {

// Channel to get/set application's window size and device's screen size.
class WindowChannel {
public:
explicit WindowChannel(BinaryMessenger* messenger,
Expand Down
4 changes: 1 addition & 3 deletions shell/platform/tizen/external_texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ class ExternalTexture : public std::enable_shared_from_this<ExternalTexture> {
}
virtual ~ExternalTexture() = default;

/**
* Returns the unique id for the ExternalTextureGL instance.
*/
// Returns the unique id for the ExternalTextureGL instance.
int64_t TextureId() { return (int64_t)texture_id_; }

virtual bool PopulateTexture(size_t width,
Expand Down
15 changes: 7 additions & 8 deletions shell/platform/tizen/external_texture_surface_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ class ExternalTextureSurfaceGL : public ExternalTexture {

virtual ~ExternalTextureSurfaceGL();

/**
* Accepts texture buffer copy request from the Flutter engine.
* When the user side marks the texture_id as available, the Flutter engine
* will callback to this method and ask for populate the |opengl_texture|
* object, such as the texture type and the format of the pixel buffer and the
* texture object.
* Returns true on success, false on failure.
*/
// Accepts texture buffer copy request from the Flutter engine.
// When the user side marks the texture_id as available, the Flutter engine
// will callback to this method and ask to populate the |opengl_texture|
// object, such as the texture type and the format of the pixel buffer and the
// texture object.
//
// Returns true on success, false on failure.
bool PopulateTexture(size_t width,
size_t height,
FlutterOpenGLTexture* opengl_texture) override;
Expand Down
6 changes: 5 additions & 1 deletion shell/platform/tizen/flutter_tizen_texture_registrar.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@ class FlutterTizenTextureRegistrar {
explicit FlutterTizenTextureRegistrar(FlutterTizenEngine* engine);

// Registers a texture described by the given |texture_info| object.
// Returns the non-zero, positive texture id or -1 on error.
//
// Returns a non-zero positive texture id, or -1 on error.
int64_t RegisterTexture(const FlutterDesktopTextureInfo* texture_info);

// Attempts to unregister the texture identified by |texture_id|.
//
// Returns true if the texture was successfully unregistered.
bool UnregisterTexture(int64_t texture_id);

// Notifies the engine about a new frame being available.
//
// Returns true on success.
bool MarkTextureFrameAvailable(int64_t texture_id);

// Attempts to populate the given |texture| by copying the
// contents of the texture identified by |texture_id|.
//
// Returns true on success.
bool PopulateTexture(int64_t texture_id,
size_t width,
Expand Down
10 changes: 4 additions & 6 deletions shell/platform/tizen/public/flutter_tizen.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ FlutterDesktopGetPluginRegistrar(FlutterDesktopEngineRef engine,
FLUTTER_EXPORT FlutterDesktopMessengerRef
FlutterDesktopEngineGetMessenger(FlutterDesktopEngineRef engine);

/**
* Return backing window for manipulation in host application.
*
* If run engine on a wearable device, need cast void* to Evas_Objct*,
* otherwise cast void* to Ecore_Wl2_Window*.
*/
// Returns the window associated with this registrar's engine instance.
//
// If the app runs on a wearable device, cast void* to Evas_Object*,
// otherwise cast it to Ecore_Wl2_Window*.
FLUTTER_EXPORT void* FlutterDesktopGetWindow(
FlutterDesktopPluginRegistrarRef registrar);

Expand Down

0 comments on commit 87fab19

Please sign in to comment.