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

Unified Diff: media/renderers/skcanvas_video_renderer.h

Issue 2369093002: Fixing repeated pixels when drawing HTML5 video to canvas. (Closed)
Patch Set: Minor corrections in unit test. Created 4 years, 2 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 | « no previous file | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/skcanvas_video_renderer.h
diff --git a/media/renderers/skcanvas_video_renderer.h b/media/renderers/skcanvas_video_renderer.h
index 86222fb55e8abd9d72d3547f97575cc3d2bb9f10..9323a82fed4d55c8160707d809c5fb6030186d33 100644
--- a/media/renderers/skcanvas_video_renderer.h
+++ b/media/renderers/skcanvas_video_renderer.h
@@ -99,6 +99,11 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
// never be painted again, so we can release the resource.
void ResetCache();
+ void CorrectLastImageDimensions(const SkIRect& visible_rect);
+
+ // Used for unit test.
+ SkISize LastImageDimensionsForTesting();
+
private:
// Update the cache holding the most-recently-painted frame. Returns false
// if the image couldn't be updated.
@@ -115,6 +120,9 @@ class MEDIA_EXPORT SkCanvasVideoRenderer {
// Used for DCHECKs to ensure method calls executed in the correct thread.
base::ThreadChecker thread_checker_;
+ // Used for unit test.
+ SkISize last_image_dimensions_for_testing_;
+
DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer);
};
« no previous file with comments | « no previous file | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698