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

Side by Side Diff: third_party/WebKit/public/platform/WebMediaPlayer.h

Issue 1833273002: Remove WebGraphicsContext3D::getGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getgles2: rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/platform/WebGraphicsContext3D.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "WebCallbacks.h" 34 #include "WebCallbacks.h"
35 #include "WebCanvas.h" 35 #include "WebCanvas.h"
36 #include "WebContentDecryptionModule.h" 36 #include "WebContentDecryptionModule.h"
37 #include "WebMediaSource.h" 37 #include "WebMediaSource.h"
38 #include "WebSetSinkIdCallbacks.h" 38 #include "WebSetSinkIdCallbacks.h"
39 #include "WebString.h" 39 #include "WebString.h"
40 #include "WebTimeRange.h" 40 #include "WebTimeRange.h"
41 #include "third_party/skia/include/core/SkXfermode.h" 41 #include "third_party/skia/include/core/SkXfermode.h"
42 42
43 namespace gpu {
44 namespace gles2 {
45 class GLES2Interface;
46 }
47 }
48
43 namespace blink { 49 namespace blink {
44 50
45 class WebAudioSourceProvider; 51 class WebAudioSourceProvider;
46 class WebContentDecryptionModule; 52 class WebContentDecryptionModule;
47 class WebSecurityOrigin; 53 class WebSecurityOrigin;
48 class WebString; 54 class WebString;
49 class WebURL; 55 class WebURL;
50 struct WebRect; 56 struct WebRect;
51 struct WebSize; 57 struct WebSize;
52 class WebGraphicsContext3D;
53 58
54 class WebMediaPlayer { 59 class WebMediaPlayer {
55 public: 60 public:
56 enum NetworkState { 61 enum NetworkState {
57 NetworkStateEmpty, 62 NetworkStateEmpty,
58 NetworkStateIdle, 63 NetworkStateIdle,
59 NetworkStateLoading, 64 NetworkStateLoading,
60 NetworkStateLoaded, 65 NetworkStateLoaded,
61 NetworkStateFormatError, 66 NetworkStateFormatError,
62 NetworkStateNetworkError, 67 NetworkStateNetworkError,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 160
156 virtual unsigned decodedFrameCount() const = 0; 161 virtual unsigned decodedFrameCount() const = 0;
157 virtual unsigned droppedFrameCount() const = 0; 162 virtual unsigned droppedFrameCount() const = 0;
158 virtual unsigned corruptedFrameCount() const { return 0; } 163 virtual unsigned corruptedFrameCount() const { return 0; }
159 virtual size_t audioDecodedByteCount() const = 0; 164 virtual size_t audioDecodedByteCount() const = 0;
160 virtual size_t videoDecodedByteCount() const = 0; 165 virtual size_t videoDecodedByteCount() const = 0;
161 166
162 virtual void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermo de::Mode) = 0; 167 virtual void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermo de::Mode) = 0;
163 168
164 // TODO(dshwang): remove non-|target| version. crbug.com/349871 169 // TODO(dshwang): remove non-|target| version. crbug.com/349871
165 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; } 170 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, unsigned texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; }
166 171
167 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it return s false. 172 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it return s false.
168 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign ed target, 173 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, unsigned target,
169 unsigned texture, unsigned internalFormat, unsigned type, int level, 174 unsigned texture, unsigned internalFormat, unsigned type, int level,
170 bool premultiplyAlpha, bool flipY) { return false; } 175 bool premultiplyAlpha, bool flipY) { return false; }
171 // Copy sub video frame texture to |texture|. If the copy is impossible or f ails, it returns false. 176 // Copy sub video frame texture to |texture|. If the copy is impossible or f ails, it returns false.
172 virtual bool copyVideoSubTextureToPlatformTexture(WebGraphicsContext3D*, uns igned target, 177 virtual bool copyVideoSubTextureToPlatformTexture(gpu::gles2::GLES2Interface *, unsigned target,
173 unsigned texture, int level, int xoffset, int yoffset, bool premultiplyA lpha, 178 unsigned texture, int level, int xoffset, int yoffset, bool premultiplyA lpha,
174 bool flipY) { return false; } 179 bool flipY) { return false; }
175 180
176 virtual WebAudioSourceProvider* getAudioSourceProvider() { return nullptr; } 181 virtual WebAudioSourceProvider* getAudioSourceProvider() { return nullptr; }
177 182
178 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry ptionModuleExceptionNotSupportedError, 0, "ERROR"); } 183 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry ptionModuleExceptionNotSupportedError, 0, "ERROR"); }
179 184
180 // Sets the poster image URL. 185 // Sets the poster image URL.
181 virtual void setPoster(const WebURL& poster) { } 186 virtual void setPoster(const WebURL& poster) { }
182 187
183 // Whether the WebMediaPlayer supports overlay fullscreen video mode. When 188 // Whether the WebMediaPlayer supports overlay fullscreen video mode. When
184 // this is true, the video layer will be removed from the layer tree when 189 // this is true, the video layer will be removed from the layer tree when
185 // entering fullscreen, and the WebMediaPlayer is responsible for displaying 190 // entering fullscreen, and the WebMediaPlayer is responsible for displaying
186 // the video in enteredFullscreen(). 191 // the video in enteredFullscreen().
187 virtual bool supportsOverlayFullscreenVideo() { return false; } 192 virtual bool supportsOverlayFullscreenVideo() { return false; }
188 // Inform WebMediaPlayer when the element has entered/exited fullscreen. 193 // Inform WebMediaPlayer when the element has entered/exited fullscreen.
189 virtual void enteredFullscreen() { } 194 virtual void enteredFullscreen() { }
190 virtual void exitedFullscreen() { } 195 virtual void exitedFullscreen() { }
191 196
192 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { } 197 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { }
193 // |selectedTrackId| is null if no track is selected. 198 // |selectedTrackId| is null if no track is selected.
194 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } 199 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { }
195 }; 200 };
196 201
197 } // namespace blink 202 } // namespace blink
198 203
199 #endif 204 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebGraphicsContext3D.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698