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

Unified Diff: remoting/client/plugin/pepper_view.cc

Issue 9277001: Replace RectVectors with SkRegions in Decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pick nits. Created 8 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 | « remoting/client/plugin/pepper_view.h ('k') | remoting/client/rectangle_update_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_view.cc
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index d8a776c8b31f26d08462bb48d3375f5507527c94..4a41f98af9426d237e99d490f6178c1d0b81f59d 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -110,7 +110,7 @@ void PepperView::SetHostSize(const SkISize& host_size) {
host_size.width(), host_size.height());
}
-void PepperView::PaintFrame(media::VideoFrame* frame, RectVector* rects) {
+void PepperView::PaintFrame(media::VideoFrame* frame, const SkRegion& region) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
SetHostSize(SkISize::Make(frame->width(), frame->height()));
@@ -124,8 +124,8 @@ void PepperView::PaintFrame(media::VideoFrame* frame, RectVector* rects) {
// Copy updated regions to the backing store and then paint the regions.
bool changes_made = false;
- for (size_t i = 0; i < rects->size(); ++i)
- changes_made |= PaintRect(frame, (*rects)[i]);
+ for (SkRegion::Iterator i(region); !i.done(); i.next())
+ changes_made |= PaintRect(frame, i.rect());
if (changes_made)
FlushGraphics(start_time);
@@ -313,13 +313,13 @@ void PepperView::ReleaseFrame(media::VideoFrame* frame) {
}
void PepperView::OnPartialFrameOutput(media::VideoFrame* frame,
- RectVector* rects,
+ SkRegion* region,
const base::Closure& done) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
// TODO(ajwong): Clean up this API to be async so we don't need to use a
// member variable as a hack.
- PaintFrame(frame, rects);
+ PaintFrame(frame, *region);
done.Run();
}
« no previous file with comments | « remoting/client/plugin/pepper_view.h ('k') | remoting/client/rectangle_update_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698