Skip to content

Commit

Permalink
Removing more no-longer needed checks and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHolc committed Jan 7, 2025
1 parent 871731b commit 61220ed
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 38 deletions.
1 change: 0 additions & 1 deletion ui/gl/gl_display.cc
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,6 @@ bool GLDisplayEGL::InitializeDisplay(bool supports_angle,
std::vector<DisplayType> init_displays,
EGLDisplayPlatform native_display,
gl::GLDisplayEGL* existing_display) {
supports_angle = false;
if (display_ != EGL_NO_DISPLAY)
return true;

Expand Down
5 changes: 0 additions & 5 deletions ui/ozone/platform/starboard/ozone_platform_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ class OzonePlatformStarboard : public OzonePlatform {
return std::make_unique<InputMethodMinimal>(ime_key_event_dispatcher);
}

// bool IsNativePixmapConfigSupported(gfx::BufferFormat format,
// gfx::BufferUsage usage) const override {
// return true;
// }

void PostCreateMainMessageLoop(base::OnceCallback<void()> shutdown_cb,
scoped_refptr<base::SingleThreadTaskRunner>
user_input_task_runner) override {}
Expand Down
60 changes: 30 additions & 30 deletions ui/ozone/platform/starboard/platform_event_source_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,37 @@
namespace starboard {

constexpr auto kSbKeyToDomCodeMap = base::MakeFixedFlatMap<SbKey, ui::DomCode>({
// Convenience keys for keyboard support.
{kSbKeySpace, ui::DomCode::MEDIA_PLAY_PAUSE},

// Keys which are used by the Cast SDK.
{kSbKeyReturn, ui::DomCode::ENTER}, {kSbKeySelect, ui::DomCode::SELECT},
{kSbKeyUp, ui::DomCode::ARROW_UP}, {kSbKeyDown, ui::DomCode::ARROW_DOWN},
{kSbKeyLeft, ui::DomCode::ARROW_LEFT},
{kSbKeyRight, ui::DomCode::ARROW_RIGHT},
{kSbKeyBack, ui::DomCode::BROWSER_BACK},

// Keys which are used by the Cast SDK when the DPAD UI is enabled.
{kSbKeyMediaPlayPause, ui::DomCode::MEDIA_PLAY_PAUSE},
{kSbKeyMediaRewind, ui::DomCode::MEDIA_REWIND},
{kSbKeyMediaFastForward, ui::DomCode::MEDIA_FAST_FORWARD},
{kSbKeyMediaNextTrack, ui::DomCode::MEDIA_TRACK_NEXT},
{kSbKeyMediaPrevTrack, ui::DomCode::MEDIA_TRACK_PREVIOUS},
{kSbKeyPause, ui::DomCode::MEDIA_PAUSE},
{kSbKeyPlay, ui::DomCode::MEDIA_PLAY},
{kSbKeyMediaStop, ui::DomCode::MEDIA_STOP},

// Keys which are not used by the Cast SDK, but are defined in the HDMI
// CEC specification.
{kSbKeyMenu, ui::DomCode::HOME},
{kSbKeyChannelUp, ui::DomCode::CHANNEL_UP},
{kSbKeyChannelDown, ui::DomCode::CHANNEL_DOWN},
{kSbKeyClosedCaption, ui::DomCode::CLOSED_CAPTION_TOGGLE},
#if SB_API_VERSION >= 15
{kSbKeyRecord, ui::DomCode::MEDIA_RECORD},
#endif // SB_API_VERSION >=15
// Convenience keys for keyboard support.
{kSbKeySpace, ui::DomCode::MEDIA_PLAY_PAUSE},

// Keys which are used by the Cast SDK.
{kSbKeyReturn, ui::DomCode::ENTER},
{kSbKeySelect, ui::DomCode::SELECT},
{kSbKeyUp, ui::DomCode::ARROW_UP},
{kSbKeyDown, ui::DomCode::ARROW_DOWN},
{kSbKeyLeft, ui::DomCode::ARROW_LEFT},
{kSbKeyRight, ui::DomCode::ARROW_RIGHT},
{kSbKeyBack, ui::DomCode::BROWSER_BACK},

// Keys which are used by the Cast SDK when the DPAD UI is enabled.
{kSbKeyMediaPlayPause, ui::DomCode::MEDIA_PLAY_PAUSE},
{kSbKeyMediaRewind, ui::DomCode::MEDIA_REWIND},
{kSbKeyMediaFastForward, ui::DomCode::MEDIA_FAST_FORWARD},
{kSbKeyMediaNextTrack, ui::DomCode::MEDIA_TRACK_NEXT},
{kSbKeyMediaPrevTrack, ui::DomCode::MEDIA_TRACK_PREVIOUS},
{kSbKeyPause, ui::DomCode::MEDIA_PAUSE},
{kSbKeyPlay, ui::DomCode::MEDIA_PLAY},
{kSbKeyMediaStop, ui::DomCode::MEDIA_STOP},

// Keys which are not used by the Cast SDK, but are defined in the HDMI
// CEC specification.
{kSbKeyMenu, ui::DomCode::HOME},
{kSbKeyChannelUp, ui::DomCode::CHANNEL_UP},
{kSbKeyChannelDown, ui::DomCode::CHANNEL_DOWN},
{kSbKeyClosedCaption, ui::DomCode::CLOSED_CAPTION_TOGGLE},
{kSbKeyRecord, ui::DomCode::MEDIA_RECORD},
});
// Hack:
// Hack: replace this when implementing event handling
static scoped_refptr<base::TaskRunner> g_reply_runner_;

void DeliverEventHandler(std::unique_ptr<ui::Event> ui_event) {
Expand Down
2 changes: 0 additions & 2 deletions ui/ozone/platform/starboard/platform_window_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "ui/ozone/platform/starboard/platform_window_starboard.h"

#include "base/functional/bind.h"
#include "base/logging.h"
#include "ui/events/event.h"
#include "ui/events/ozone/events_ozone.h"
#include "ui/events/platform/platform_event_source.h"
Expand Down Expand Up @@ -46,7 +45,6 @@ bool PlatformWindowStarboard::CanDispatchEvent(const PlatformEvent& event) {
}

uint32_t PlatformWindowStarboard::DispatchEvent(const PlatformEvent& event) {
LOG(INFO) << "PlatformWindowStarboard::DispatchEvent";
DispatchEventFromNativeUiEvent(
event, base::BindOnce(&PlatformWindowDelegate::DispatchEvent,
base::Unretained(delegate())));
Expand Down

0 comments on commit 61220ed

Please sign in to comment.