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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 2802034: Linux: Flush cairo surface at end of CanvasPaintLinux. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/webplugin_delegate_proxy.h" 5 #include "chrome/renderer/webplugin_delegate_proxy.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 CGBitmapContextGetBitsPerPixel(bg_context)); 862 CGBitmapContextGetBitsPerPixel(bg_context));
863 const unsigned char* bg_bytes = static_cast<const unsigned char*>( 863 const unsigned char* bg_bytes = static_cast<const unsigned char*>(
864 CGBitmapContextGetData(bg_context)); 864 CGBitmapContextGetData(bg_context));
865 int full_bg_width = CGBitmapContextGetWidth(bg_context); 865 int full_bg_width = CGBitmapContextGetWidth(bg_context);
866 int full_bg_height = CGBitmapContextGetHeight(bg_context); 866 int full_bg_height = CGBitmapContextGetHeight(bg_context);
867 int bg_stride = CGBitmapContextGetBytesPerRow(bg_context); 867 int bg_stride = CGBitmapContextGetBytesPerRow(bg_context);
868 int bg_last_row = CGBitmapContextGetHeight(bg_context) - 1; 868 int bg_last_row = CGBitmapContextGetHeight(bg_context) - 1;
869 869
870 int bytes_per_pixel = CGBitmapContextGetBitsPerPixel(context) / 8; 870 int bytes_per_pixel = CGBitmapContextGetBitsPerPixel(context) / 8;
871 #else 871 #else
872 cairo_surface_flush(page_surface);
872 const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface); 873 const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface);
873 int page_stride = cairo_image_surface_get_stride(page_surface); 874 int page_stride = cairo_image_surface_get_stride(page_surface);
874 int page_start_x = static_cast<int>(page_x_double); 875 int page_start_x = static_cast<int>(page_x_double);
875 int page_start_y = static_cast<int>(page_y_double); 876 int page_start_y = static_cast<int>(page_y_double);
876 877
877 skia::PlatformDevice& device = 878 skia::PlatformDevice& device =
878 background_store_canvas_->getTopPlatformDevice(); 879 background_store_canvas_->getTopPlatformDevice();
879 cairo_surface_t* bg_surface = cairo_get_target(device.beginPlatformPaint()); 880 cairo_surface_t* bg_surface = cairo_get_target(device.beginPlatformPaint());
880 DCHECK_EQ(cairo_surface_get_type(bg_surface), CAIRO_SURFACE_TYPE_IMAGE); 881 DCHECK_EQ(cairo_surface_get_type(bg_surface), CAIRO_SURFACE_TYPE_IMAGE);
881 DCHECK_EQ(cairo_image_surface_get_format(bg_surface), CAIRO_FORMAT_ARGB32); 882 DCHECK_EQ(cairo_image_surface_get_format(bg_surface), CAIRO_FORMAT_ARGB32);
883 cairo_surface_flush(bg_surface);
882 const unsigned char* bg_bytes = cairo_image_surface_get_data(bg_surface); 884 const unsigned char* bg_bytes = cairo_image_surface_get_data(bg_surface);
883 int full_bg_width = cairo_image_surface_get_width(bg_surface); 885 int full_bg_width = cairo_image_surface_get_width(bg_surface);
884 int full_bg_height = cairo_image_surface_get_height(bg_surface); 886 int full_bg_height = cairo_image_surface_get_height(bg_surface);
885 int bg_stride = cairo_image_surface_get_stride(bg_surface); 887 int bg_stride = cairo_image_surface_get_stride(bg_surface);
886 888
887 int bytes_per_pixel = 4; // ARGB32 = 4 bytes per pixel. 889 int bytes_per_pixel = 4; // ARGB32 = 4 bytes per pixel.
888 #endif 890 #endif
889 891
890 int damage_width = content_rect.width(); 892 int damage_width = content_rect.width();
891 int damage_height = content_rect.height(); 893 int damage_height = content_rect.height();
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 if (index->mime_type == "application/x-vnd.moveplayer.qm" || 1555 if (index->mime_type == "application/x-vnd.moveplayer.qm" ||
1554 index->mime_type == "application/x-vnd.moveplay2.qm" || 1556 index->mime_type == "application/x-vnd.moveplay2.qm" ||
1555 index->mime_type == "application/x-vnd.movenetworks.qm" || 1557 index->mime_type == "application/x-vnd.movenetworks.qm" ||
1556 index->mime_type == "application/x-vnd.mnplayer.qm") { 1558 index->mime_type == "application/x-vnd.mnplayer.qm") {
1557 return true; 1559 return true;
1558 } 1560 }
1559 } 1561 }
1560 return false; 1562 return false;
1561 } 1563 }
1562 #endif 1564 #endif
OLDNEW
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698