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

Unified Diff: chrome/gpu/arc_video_accelerator.h

Issue 2036723002: Limit the number of ARC codec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address dcheng's comments: static_assert Created 4 years, 6 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 | « chrome/gpu/arc_gpu_video_decode_accelerator.cc ('k') | chrome/gpu/gpu_arc_video_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/arc_video_accelerator.h
diff --git a/chrome/gpu/arc_video_accelerator.h b/chrome/gpu/arc_video_accelerator.h
index 4c99fe05ec6b83bdc4c2ef892e12856e3ec694c6..079edfb90b0ef243b8a3f07eddd16dec8549e90f 100644
--- a/chrome/gpu/arc_video_accelerator.h
+++ b/chrome/gpu/arc_video_accelerator.h
@@ -52,11 +52,13 @@ struct VideoFormat {
// Chromium and the output buffers are returned back to Android side.
class ArcVideoAccelerator {
public:
- enum Error {
+ enum Result {
+ SUCCESS = 0,
ILLEGAL_STATE = 1,
INVALID_ARGUMENT = 2,
UNREADABLE_INPUT = 3,
PLATFORM_FAILURE = 4,
+ INSUFFICIENT_RESOURCES = 5,
};
struct Config {
@@ -79,9 +81,9 @@ class ArcVideoAccelerator {
virtual ~Client() {}
// Called when an asynchronous error happens. The errors in Initialize()
- // will not be reported here, but will be indicated by a false return value
+ // will not be reported here, but will be indicated by a return value
// there.
- virtual void OnError(Error error) = 0;
+ virtual void OnError(Result error) = 0;
// Called when a buffer with the specified |index| and |port| has been
// processed and is no longer used in the accelerator. For input buffers,
@@ -104,8 +106,8 @@ class ArcVideoAccelerator {
// Initializes the ArcVideoAccelerator with specific configuration. This
// must be called before any other methods. This call is synchronous and
- // returns true iff initialization is successful.
- virtual bool Initialize(const Config& config, Client* client) = 0;
+ // returns SUCCESS iff initialization is successful.
+ virtual Result Initialize(const Config& config, Client* client) = 0;
// Assigns a shared memory to be used for the accelerator at the specified
// port and index. A buffer must be successfully bound before it can be passed
« no previous file with comments | « chrome/gpu/arc_gpu_video_decode_accelerator.cc ('k') | chrome/gpu/gpu_arc_video_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698