Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: media/filters/gpu_video_accelerator_factories.h

Issue 144303004: Revert of Revert of Revert of Remove threading from RendererGpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dthread
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/test/fake_gpu_video_accelerator_factories.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_accelerator_factories.h
diff --git a/media/filters/gpu_video_accelerator_factories.h b/media/filters/gpu_video_accelerator_factories.h
index 88d74b57aef2b3fdcedb2448dc3fe1d44dd84a8c..b6de58f4a239d2b22eee8a21b5435f9c4754cf7c 100644
--- a/media/filters/gpu_video_accelerator_factories.h
+++ b/media/filters/gpu_video_accelerator_factories.h
@@ -21,12 +21,6 @@
// Helper interface for specifying factories needed to instantiate a hardware
// video accelerator.
-// Threading model:
-// * The GpuVideoAcceleratorFactories may be constructed on any thread.
-// * The GpuVideoAcceleratorFactories has an associated message loop, which may
-// be retrieved as |GetMessageLoop()|.
-// * All calls to the Factories after construction must be made on its message
-// loop.
class MEDIA_EXPORT GpuVideoAcceleratorFactories
: public base::RefCountedThreadSafe<GpuVideoAcceleratorFactories> {
public:
@@ -49,10 +43,9 @@
virtual void WaitSyncPoint(uint32 sync_point) = 0;
- // Read pixels within |visible_rect| boundaries from a native texture and
- // store into |pixels| as RGBA.
+ // Read pixels from a native texture and store into |pixels| as RGBA.
virtual void ReadPixels(uint32 texture_id,
- const gfx::Rect& visible_rect,
+ const gfx::Size& size,
const SkBitmap& pixels) = 0;
// Allocate & return a shared memory segment. Caller is responsible for
@@ -62,6 +55,13 @@
// Returns the task runner the video accelerator runs on.
virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
+ // Abort any outstanding factory operations and error any future
+ // attempts at factory operations
+ virtual void Abort() = 0;
+
+ // Returns true if Abort() has been called.
+ virtual bool IsAborted() = 0;
+
protected:
friend class base::RefCountedThreadSafe<GpuVideoAcceleratorFactories>;
virtual ~GpuVideoAcceleratorFactories();
« no previous file with comments | « media/cast/test/fake_gpu_video_accelerator_factories.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698