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

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

Issue 4399003: Deleted code associated with --enable-gpu-rendering and... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 copy_rect.y()); // dest_y 153 copy_rect.y()); // dest_y
154 } 154 }
155 155
156 XFreePixmap(display_, pixmap); 156 XFreePixmap(display_, pixmap);
157 } 157 }
158 158
159 void BackingStoreX::PaintToBackingStore( 159 void BackingStoreX::PaintToBackingStore(
160 RenderProcessHost* process, 160 RenderProcessHost* process,
161 TransportDIB::Id bitmap, 161 TransportDIB::Id bitmap,
162 const gfx::Rect& bitmap_rect, 162 const gfx::Rect& bitmap_rect,
163 const std::vector<gfx::Rect>& copy_rects, 163 const std::vector<gfx::Rect>& copy_rects) {
164 bool* painted_synchronously) {
165 // Our paints are always synchronous and the caller can free the TransportDIB
166 // when we're done, even on error.
167 *painted_synchronously = true;
168
169 if (!display_) 164 if (!display_)
170 return; 165 return;
171 166
172 if (bitmap_rect.IsEmpty()) 167 if (bitmap_rect.IsEmpty())
173 return; 168 return;
174 169
175 const int width = bitmap_rect.width(); 170 const int width = bitmap_rect.width();
176 const int height = bitmap_rect.height(); 171 const int height = bitmap_rect.height();
177 172
178 if (width <= 0 || width > kMaxVideoLayerSize || 173 if (width <= 0 || width > kMaxVideoLayerSize ||
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 cairo_set_source(cr, pattern); 467 cairo_set_source(cr, pattern);
473 cairo_pattern_destroy(pattern); 468 cairo_pattern_destroy(pattern);
474 469
475 cairo_identity_matrix(cr); 470 cairo_identity_matrix(cr);
476 471
477 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height()); 472 cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height());
478 cairo_fill(cr); 473 cairo_fill(cr);
479 cairo_destroy(cr); 474 cairo_destroy(cr);
480 } 475 }
481 #endif 476 #endif
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/backing_store_x.h ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698