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

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

Issue 2276033002: Pass SkPaint instead of its alpha and mode in WebMediaPlayer::paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android should compile Created 4 years, 3 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/Source/core/paint/VideoPainterTest.cpp ('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 19 matching lines...) Expand all
30 30
31 #ifndef WebMediaPlayer_h 31 #ifndef WebMediaPlayer_h
32 #define WebMediaPlayer_h 32 #define WebMediaPlayer_h
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
41 #include "third_party/skia/include/core/SkXfermode.h" 41 class SkPaint;
42 42
43 namespace gpu { 43 namespace gpu {
44 namespace gles2 { 44 namespace gles2 {
45 class GLES2Interface; 45 class GLES2Interface;
46 } 46 }
47 } 47 }
48 48
49 namespace blink { 49 namespace blink {
50 50
51 class WebAudioSourceProvider; 51 class WebAudioSourceProvider;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 virtual bool didPassCORSAccessCheck() const = 0; 160 virtual bool didPassCORSAccessCheck() const = 0;
161 161
162 virtual double mediaTimeForTimeValue(double timeValue) const = 0; 162 virtual double mediaTimeForTimeValue(double timeValue) const = 0;
163 163
164 virtual unsigned decodedFrameCount() const = 0; 164 virtual unsigned decodedFrameCount() const = 0;
165 virtual unsigned droppedFrameCount() const = 0; 165 virtual unsigned droppedFrameCount() const = 0;
166 virtual unsigned corruptedFrameCount() const { return 0; } 166 virtual unsigned corruptedFrameCount() const { return 0; }
167 virtual size_t audioDecodedByteCount() const = 0; 167 virtual size_t audioDecodedByteCount() const = 0;
168 virtual size_t videoDecodedByteCount() const = 0; 168 virtual size_t videoDecodedByteCount() const = 0;
169 169
170 virtual void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermo de::Mode) = 0; 170 virtual void paint(WebCanvas*, const WebRect&, SkPaint&) = 0;
171 171
172 // TODO(dshwang): remove non-|target| version. crbug.com/349871 172 // TODO(dshwang): remove non-|target| version. crbug.com/349871
173 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, unsigned texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; } 173 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, unsigned texture, unsigned internalFormat, unsigned type, bool premultiplyAlpha, bool flipY) { return false; }
174 174
175 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it return s false. 175 // Do a GPU-GPU textures copy. If the copy is impossible or fails, it return s false.
176 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, unsigned target, 176 virtual bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface*, unsigned target,
177 unsigned texture, unsigned internalFormat, unsigned type, int level, 177 unsigned texture, unsigned internalFormat, unsigned type, int level,
178 bool premultiplyAlpha, bool flipY) { return false; } 178 bool premultiplyAlpha, bool flipY) { return false; }
179 // Copy sub video frame texture to |texture|. If the copy is impossible or f ails, it returns false. 179 // Copy sub video frame texture to |texture|. If the copy is impossible or f ails, it returns false.
180 virtual bool copyVideoSubTextureToPlatformTexture(gpu::gles2::GLES2Interface *, unsigned target, 180 virtual bool copyVideoSubTextureToPlatformTexture(gpu::gles2::GLES2Interface *, unsigned target,
(...skipping 17 matching lines...) Expand all
198 virtual void exitedFullscreen() { } 198 virtual void exitedFullscreen() { }
199 199
200 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { } 200 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { }
201 // |selectedTrackId| is null if no track is selected. 201 // |selectedTrackId| is null if no track is selected.
202 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } 202 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { }
203 }; 203 };
204 204
205 } // namespace blink 205 } // namespace blink
206 206
207 #endif 207 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/VideoPainterTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698