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

Unified Diff: content/browser/renderer_host/backing_store_gtk.cc

Issue 11031055: Introduce PlatformBitmap, which is a minimal helper class that wraps an SkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/backing_store_gtk.cc
===================================================================
--- content/browser/renderer_host/backing_store_gtk.cc (revision 161107)
+++ content/browser/renderer_host/backing_store_gtk.cc (working copy)
@@ -499,7 +499,7 @@
}
bool BackingStoreGtk::CopyFromBackingStore(const gfx::Rect& rect,
- skia::PlatformCanvas* output) {
+ skia::PlatformBitmap* output) {
base::TimeTicks begin_time = base::TimeTicks::Now();
if (visual_depth_ < 24) {
@@ -571,7 +571,7 @@
// TODO(jhawkins): Need to convert the image data if the image bits per pixel
// is not 32.
// Note that this also initializes the output bitmap as opaque.
- if (!output->initialize(width, height, true) ||
+ if (!output->Allocate(width, height, true) ||
image->bits_per_pixel != 32) {
if (shared_memory_support_ != ui::SHARED_MEMORY_NONE)
DestroySharedImage(display_, image, &shminfo);
@@ -584,7 +584,7 @@
// it and copy each row out, only up to the pixels we're actually
// using. This code assumes a visual mode where a pixel is
// represented using a 32-bit unsigned int, with a byte per component.
- SkBitmap bitmap = skia::GetTopDevice(*output)->accessBitmap(true);
+ const SkBitmap& bitmap = output->GetBitmap();
SkAutoLockPixels alp(bitmap);
for (int y = 0; y < height; y++) {
« 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