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

Unified Diff: chrome/renderer/render_process.cc

Issue 118420: Adds kind-of-live thumbnail generation for a potential tab switcher. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/common/transport_dib_win.cc ('k') | chrome/test/unit/unittests.vcproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_process.cc
===================================================================
--- chrome/renderer/render_process.cc (revision 17971)
+++ chrome/renderer/render_process.cc (working copy)
@@ -136,21 +136,6 @@
// -----------------------------------------------------------------------------
// Platform specific code for dealing with bitmap transport...
-// -----------------------------------------------------------------------------
-// Create a platform canvas object which renders into the given transport
-// memory.
-// -----------------------------------------------------------------------------
-static skia::PlatformCanvas* CanvasFromTransportDIB(
- TransportDIB* dib, const gfx::Rect& rect) {
-#if defined(OS_WIN)
- return new skia::PlatformCanvas(rect.width(), rect.height(), true,
- dib->handle());
-#elif defined(OS_LINUX) || defined(OS_MACOSX)
- return new skia::PlatformCanvas(rect.width(), rect.height(), true,
- reinterpret_cast<uint8_t*>(dib->memory()));
-#endif
-}
-
TransportDIB* RenderProcess::CreateTransportDIB(size_t size) {
#if defined(OS_WIN) || defined(OS_LINUX)
// Windows and Linux create transport DIBs inside the renderer
@@ -196,7 +181,7 @@
return false;
}
- return CanvasFromTransportDIB(*memory, rect);
+ return (*memory)->GetPlatformCanvas(rect.width(), rect.height());
}
void RenderProcess::ReleaseTransportDIB(TransportDIB* mem) {
« no previous file with comments | « chrome/common/transport_dib_win.cc ('k') | chrome/test/unit/unittests.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698