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

Unified Diff: chrome/renderer/render_process.cc

Issue 126101: Adds kind-of-live thumbnail generation for a potential tab switcher. (Closed)
Patch Set: For Checking hopefully 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/renderer/DEPS ('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
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc
index 6cfb56d5dfc854b94670a31c9fcba21b37befaf8..027b2092b437ca02dcb760eb64b39c9d4fdaf25f 100644
--- a/chrome/renderer/render_process.cc
+++ b/chrome/renderer/render_process.cc
@@ -136,21 +136,6 @@ bool RenderProcess::InProcessPlugins() {
// -----------------------------------------------------------------------------
// 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 @@ skia::PlatformCanvas* RenderProcess::GetDrawingCanvas(
return false;
}
- return CanvasFromTransportDIB(*memory, rect);
+ return (*memory)->GetPlatformCanvas(rect.width(), rect.height());
}
void RenderProcess::ReleaseTransportDIB(TransportDIB* mem) {
« no previous file with comments | « chrome/renderer/DEPS ('k') | chrome/test/unit/unittests.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698