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

Side by Side Diff: chrome/browser/renderer_host/backing_store_x.cc

Issue 4319003: Replace TabContentsViewGtk with TabContentsViewViews as part of the ongoing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last patchset was missing canvas_direct2d.cc edit, fixed it and sent to try bots. Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/backing_store_x.h" 5 #include "chrome/browser/renderer_host/backing_store_x.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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 clip_rect.y() /* source y */, 429 clip_rect.y() /* source y */,
430 clip_rect.width() - abs(dx), 430 clip_rect.width() - abs(dx),
431 clip_rect.height(), 431 clip_rect.height(),
432 std::max(clip_rect.x(), clip_rect.x() + dx) /* dest x */, 432 std::max(clip_rect.x(), clip_rect.x() + dx) /* dest x */,
433 clip_rect.y() /* dest x */); 433 clip_rect.y() /* dest x */);
434 } 434 }
435 } 435 }
436 } 436 }
437 437
438 void BackingStoreX::XShowRect(const gfx::Rect& rect, XID target) { 438 void BackingStoreX::XShowRect(const gfx::Rect& rect, XID target) {
439 XShowRect(gfx::Point(0, 0), rect, target);
440 }
441
442 void BackingStoreX::XShowRect(const gfx::Point &origin,
443 const gfx::Rect& rect, XID target) {
439 XCopyArea(display_, pixmap_, target, static_cast<GC>(pixmap_gc_), 444 XCopyArea(display_, pixmap_, target, static_cast<GC>(pixmap_gc_),
440 rect.x(), rect.y(), rect.width(), rect.height(), 445 rect.x(), rect.y(), rect.width(), rect.height(),
441 rect.x(), rect.y()); 446 rect.x() + origin.x(), rect.y() + origin.y());
442 } 447 }
443 448
444 void BackingStoreX::CairoShowRect(const gfx::Rect& rect, 449 void BackingStoreX::CairoShowRect(const gfx::Rect& rect,
445 GdkDrawable* drawable) { 450 GdkDrawable* drawable) {
446 cairo_surface_t* surface = cairo_xlib_surface_create( 451 cairo_surface_t* surface = cairo_xlib_surface_create(
447 display_, pixmap_, static_cast<Visual*>(visual_), 452 display_, pixmap_, static_cast<Visual*>(visual_),
448 size().width(), size().height()); 453 size().width(), size().height());
449 cairo_t* cr = gdk_cairo_create(drawable); 454 cairo_t* cr = gdk_cairo_create(drawable);
450 cairo_set_source_surface(cr, surface, 0, 0); 455 cairo_set_source_surface(cr, surface, 0, 0);
451 456
(...skipping 20 matching lines...) Expand all
472 cairo_set_source(cr, pattern); 477 cairo_set_source(cr, pattern);
473 cairo_pattern_destroy(pattern); 478 cairo_pattern_destroy(pattern);
474 479
475 cairo_identity_matrix(cr); 480 cairo_identity_matrix(cr);
476 481
477 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height()); 482 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height());
478 cairo_fill(cr); 483 cairo_fill(cr);
479 cairo_destroy(cr); 484 cairo_destroy(cr);
480 } 485 }
481 #endif 486 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698