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

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

Issue 7304005: Gets BackingStoreSkia to work on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nuke ifdefs Created 9 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/backing_store_skia.cc
diff --git a/content/browser/renderer_host/backing_store_skia.cc b/content/browser/renderer_host/backing_store_skia.cc
index 8c79958c2ffd9d3f0b2134c7e7b85e2142ba1c11..56dfc869717f7c47b762f9ed31ada46169ef889e 100644
--- a/content/browser/renderer_host/backing_store_skia.cc
+++ b/content/browser/renderer_host/backing_store_skia.cc
@@ -60,8 +60,9 @@ void BackingStoreSkia::PaintToBackingStore(
if (!dib)
return;
- scoped_ptr<skia::PlatformCanvas> p_canvas(
- dib->GetPlatformCanvas(width, height));
+ SkBitmap sk_bitmap;
+ sk_bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height);
+ sk_bitmap.setPixels(dib->memory());
for (size_t i = 0; i < copy_rects.size(); i++) {
const gfx::Rect& copy_rect = copy_rects[i];
int x = copy_rect.x() - bitmap_rect.x();
@@ -72,8 +73,7 @@ void BackingStoreSkia::PaintToBackingStore(
SkRect dstrect = SkRect::MakeXYWH(
SkIntToScalar(copy_rect.x()), SkIntToScalar(copy_rect.y()),
SkIntToScalar(w), SkIntToScalar(h));
- SkBitmap b = skia::GetTopDevice(*p_canvas)->accessBitmap(false);
- canvas_.get()->drawBitmapRect(b, &srcrect, dstrect);
+ canvas_.get()->drawBitmapRect(sk_bitmap, &srcrect, dstrect);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698