Skip to content

Instantly share code, notes, and snippets.

@tiagovignatti
Created March 2, 2015 19:13
Show Gist options
  • Save tiagovignatti/2cb93d18799a32a73559 to your computer and use it in GitHub Desktop.
Save tiagovignatti/2cb93d18799a32a73559 to your computer and use it in GitHub Desktop.
diff --git a/content/common/gpu/media/vaapi_h264_decoder_unittest.cc b/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
index 4d20c23..7ac32ca 100644
--- a/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
+++ b/content/common/gpu/media/vaapi_h264_decoder_unittest.cc
@@ -8,13 +8,16 @@
// See http://code.google.com/p/googletest/issues/detail?id=371
#include "testing/gtest/include/gtest/gtest.h"
+#include "base/at_exit.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
#include "content/common/gpu/media/vaapi_h264_decoder.h"
#include "media/base/video_decoder_config.h"
#include "third_party/libyuv/include/libyuv.h"
+#include "ui/ozone/public/ozone_platform.h"
// This program is run like this:
// DISPLAY=:0 ./vaapi_h264_decoder_unittest --input_file input.h264
@@ -362,8 +365,25 @@ int main(int argc, char** argv) {
}
if (it->first == "v" || it->first == "vmodule")
continue;
+ if (it->first == "ozone-platform" || it->first == "ozone-use-surfaceless")
+ continue;
LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
}
+ base::ShadowingAtExitManager at_exit_manager;
+#if defined(OS_WIN) || defined(USE_OZONE)
+ // For windows the decoding thread initializes the media foundation decoder
+ // which uses COM. We need the thread to be a UI thread.
+ // On Ozone, the backend initializes the event system using a UI
+ // thread.
+ base::MessageLoopForUI main_loop;
+#else
+ base::MessageLoop main_loop;
+#endif // OS_WIN || USE_OZONE
+
+#if defined(USE_OZONE)
+ ui::OzonePlatform::InitializeForUI();
+#endif
+
return RUN_ALL_TESTS();
}
diff --git a/tools/perf/page_sets/tough_video_cases.py b/tools/perf/page_sets/tough_video_cases.py
index 2fc4ef5..09ba154 100644
--- a/tools/perf/page_sets/tough_video_cases.py
+++ b/tools/perf/page_sets/tough_video_cases.py
@@ -7,9 +7,9 @@ from telemetry.page import page_set as page_set_module
class ToughVideoCasesPage(page_module.Page):
- def __init__(self, url, page_set, labels=None):
+ def __init__(self, url, page_set, name='', labels=None):
super(ToughVideoCasesPage, self).__init__(
- url=url, page_set=page_set, labels=labels)
+ url=url, page_set=page_set, name=name, labels=labels)
def LoopMixedAudio(self, action_runner):
action_runner.PlayMedia(selector='#background_audio',
@@ -41,7 +41,8 @@ class Page1(ToughVideoCasesPage):
def __init__(self, page_set):
super(Page1, self).__init__(
url='file://tough_video_cases/video.html?src=crowd.wav&type=audio',
- page_set=page_set)
+ page_set=page_set,
+ name='LinkedIn')
self.add_browser_metrics = True
@@ -492,7 +493,7 @@ class ToughVideoCasesPageSet(page_set_module.PageSet):
"""
def __init__(self):
super(ToughVideoCasesPageSet, self).__init__(
- bucket=page_set_module.INTERNAL_BUCKET)
+ bucket=page_set_module.PARTNER_BUCKET)
self.AddUserStory(Page1(self))
self.AddUserStory(Page2(self))
diff --git a/tools/telemetry/telemetry/user_story/user_story_filter.py b/tools/telemetry/telemetry/user_story/user_story_filter.py
index 1c28beb..1ae0700 100644
--- a/tools/telemetry/telemetry/user_story/user_story_filter.py
+++ b/tools/telemetry/telemetry/user_story/user_story_filter.py
@@ -56,6 +56,7 @@ class UserStoryFilter(command_line.ArgumentHandlerMixIn):
@classmethod
def IsSelected(cls, user_story):
+ #print ('TIAGO ', user_story, cls._page_regex.pattern, user_story.display_name, user_story.name, cls._page_regex.search(user_story.display_name))
# Exclude filters take priority.
if cls._exclude_labels and HasLabelIn(user_story, cls._exclude_labels):
return False
diff --git a/ui/ozone/platform/dri/gbm_surface_factory.cc b/ui/ozone/platform/dri/gbm_surface_factory.cc
index 9742541..8ab8e8a 100644
--- a/ui/ozone/platform/dri/gbm_surface_factory.cc
+++ b/ui/ozone/platform/dri/gbm_surface_factory.cc
@@ -82,7 +82,9 @@ void GbmSurfaceFactory::InitializeGpu(
}
intptr_t GbmSurfaceFactory::GetNativeDisplay() {
- return EGL_DEFAULT_DISPLAY;
+ scoped_refptr<GbmWrapper> gbm = GetGbmDevice(gfx::kNullAcceleratedWidget);
+ DCHECK(gbm);
+ return reinterpret_cast<intptr_t>(gbm->device());
}
int GbmSurfaceFactory::GetDrmFd() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment