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

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

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
11 #include <sys/shm.h> 11 #include <sys/shm.h>
12 #include <X11/extensions/sync.h> 12 #include <X11/extensions/sync.h>
13 13
14 #if defined(OS_OPENBSD) || defined(OS_FREEBSD) 14 #if defined(OS_OPENBSD) || defined(OS_FREEBSD)
15 #include <sys/endian.h> 15 #include <sys/endian.h>
16 #endif 16 #endif
17 17
18 #include <algorithm> 18 #include <algorithm>
19 #include <utility> 19 #include <utility>
20 #include <limits> 20 #include <limits>
21 #include <queue> 21 #include <queue>
22 22
23 #include "base/compiler_specific.h" 23 #include "base/compiler_specific.h"
24 #include "base/logging.h" 24 #include "base/logging.h"
25 #include "base/memory/singleton.h" 25 #include "base/memory/singleton.h"
26 #include "base/metrics/histogram.h" 26 #include "base/metrics/histogram.h"
27 #include "base/time.h" 27 #include "base/time.h"
28 #include "content/browser/renderer_host/render_process_host.h" 28 #include "content/browser/renderer_host/render_process_host_impl.h"
29 #include "skia/ext/platform_canvas.h" 29 #include "skia/ext/platform_canvas.h"
30 #include "third_party/skia/include/core/SkBitmap.h" 30 #include "third_party/skia/include/core/SkBitmap.h"
31 #include "ui/base/x/x11_util.h" 31 #include "ui/base/x/x11_util.h"
32 #include "ui/base/x/x11_util_internal.h" 32 #include "ui/base/x/x11_util_internal.h"
33 #include "ui/base/gtk/gtk_signal.h" 33 #include "ui/base/gtk/gtk_signal.h"
34 #include "ui/gfx/rect.h" 34 #include "ui/gfx/rect.h"
35 #include "ui/gfx/surface/transport_dib.h" 35 #include "ui/gfx/surface/transport_dib.h"
36 36
37 namespace { 37 namespace {
38 38
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 copy_rect.width(), // width 321 copy_rect.width(), // width
322 copy_rect.height(), // height 322 copy_rect.height(), // height
323 copy_rect.x(), // dest_x 323 copy_rect.x(), // dest_x
324 copy_rect.y()); // dest_y 324 copy_rect.y()); // dest_y
325 } 325 }
326 326
327 XFreePixmap(display_, pixmap); 327 XFreePixmap(display_, pixmap);
328 } 328 }
329 329
330 void BackingStoreGtk::PaintToBackingStore( 330 void BackingStoreGtk::PaintToBackingStore(
331 RenderProcessHost* process, 331 content::RenderProcessHost* process,
332 TransportDIB::Id bitmap, 332 TransportDIB::Id bitmap,
333 const gfx::Rect& bitmap_rect, 333 const gfx::Rect& bitmap_rect,
334 const std::vector<gfx::Rect>& copy_rects, 334 const std::vector<gfx::Rect>& copy_rects,
335 const base::Closure& completion_callback, 335 const base::Closure& completion_callback,
336 bool* scheduled_completion_callback) { 336 bool* scheduled_completion_callback) {
337 *scheduled_completion_callback = false; 337 *scheduled_completion_callback = false;
338 338
339 if (!display_) 339 if (!display_)
340 return; 340 return;
341 341
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 cairo_set_source(cr, pattern); 653 cairo_set_source(cr, pattern);
654 cairo_pattern_destroy(pattern); 654 cairo_pattern_destroy(pattern);
655 655
656 cairo_identity_matrix(cr); 656 cairo_identity_matrix(cr);
657 657
658 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height()); 658 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height());
659 cairo_fill(cr); 659 cairo_fill(cr);
660 cairo_destroy(cr); 660 cairo_destroy(cr);
661 } 661 }
662 #endif 662 #endif
OLDNEW
« no previous file with comments | « content/browser/renderer_host/backing_store_gtk.h ('k') | content/browser/renderer_host/backing_store_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698