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

Unified Diff: remoting/client/x11_view.cc

Issue 2963003: Changing UpdateStreamPacket protobuf definition for chromoting (Closed)
Patch Set: fixed comments Created 10 years, 5 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/simple_client.cc ('k') | remoting/host/client_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/x11_view.cc
diff --git a/remoting/client/x11_view.cc b/remoting/client/x11_view.cc
index d380cd29119b4cd0d275beb58b5f02adf3b3f3bb..c5f9a8880b1eb5b5e1dd0ab88c524e840910211a 100644
--- a/remoting/client/x11_view.cc
+++ b/remoting/client/x11_view.cc
@@ -20,6 +20,9 @@ X11View::X11View(Display* display, XID window, int width, int height)
width_(width),
height_(height),
picture_(0) {
+ media::VideoFrame::CreateFrame(media::VideoFrame::RGB32, width_, height_,
+ base::TimeDelta(), base::TimeDelta(), &frame_);
+ DCHECK(frame_);
}
X11View::~X11View() {
@@ -30,7 +33,7 @@ void X11View::Paint() {
all_update_rects_.clear();
// If we have not initialized the render target then do it now.
- if (!frame_)
+ if (!picture_)
InitPaintTarget();
// Upload the image to a pixmap. And then create a picture from the pixmap
@@ -112,11 +115,6 @@ void X11View::InitPaintTarget() {
picture_ = XRenderCreatePicture(display_, window_, pictformat, 0, NULL);
CHECK(picture_) << "Backing picture not created";
-
- // Create the video frame to carry the decoded image.
- media::VideoFrame::CreateFrame(media::VideoFrame::RGB32, width_, height_,
- base::TimeDelta(), base::TimeDelta(), &frame_);
- DCHECK(frame_);
}
void X11View::HandleBeginUpdateStream(HostMessage* msg) {
« no previous file with comments | « remoting/client/simple_client.cc ('k') | remoting/host/client_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698