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

Side by Side Diff: content/browser/renderer_host/backing_store_gtk.cc

Issue 10540144: Tag TransportDIBs with the device scale factor they expect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/backing_store_gtk.h" 5 #include "content/browser/renderer_host/backing_store_gtk.h"
6 6
7 #include <cairo-xlib.h> 7 #include <cairo-xlib.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/ipc.h> 10 #include <sys/ipc.h>
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 XFreePixmap(display_, pixmap); 329 XFreePixmap(display_, pixmap);
330 } 330 }
331 331
332 void BackingStoreGtk::PaintToBackingStore( 332 void BackingStoreGtk::PaintToBackingStore(
333 content::RenderProcessHost* process, 333 content::RenderProcessHost* process,
334 TransportDIB::Id bitmap, 334 TransportDIB::Id bitmap,
335 const gfx::Rect& bitmap_rect, 335 const gfx::Rect& bitmap_rect,
336 const std::vector<gfx::Rect>& copy_rects, 336 const std::vector<gfx::Rect>& copy_rects,
337 float scale_factor,
337 const base::Closure& completion_callback, 338 const base::Closure& completion_callback,
338 bool* scheduled_completion_callback) { 339 bool* scheduled_completion_callback) {
339 *scheduled_completion_callback = false; 340 *scheduled_completion_callback = false;
340 341
341 if (!display_) 342 if (!display_)
342 return; 343 return;
343 344
344 if (bitmap_rect.IsEmpty()) 345 if (bitmap_rect.IsEmpty())
345 return; 346 return;
346 347
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 cairo_set_source(cr, pattern); 656 cairo_set_source(cr, pattern);
656 cairo_pattern_destroy(pattern); 657 cairo_pattern_destroy(pattern);
657 658
658 cairo_identity_matrix(cr); 659 cairo_identity_matrix(cr);
659 660
660 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height()); 661 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height());
661 cairo_fill(cr); 662 cairo_fill(cr);
662 cairo_destroy(cr); 663 cairo_destroy(cr);
663 } 664 }
664 #endif 665 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698