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

Side by Side Diff: chrome/common/transport_dib_win.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/transport_dib_mac.cc ('k') | chrome/renderer/render_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <limits> 5 #include <limits>
6 #include <windows.h> 6 #include <windows.h>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "chrome/common/transport_dib.h" 10 #include "chrome/common/transport_dib.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // There doesn't seem to be any way to find the size of the shared memory 53 // There doesn't seem to be any way to find the size of the shared memory
54 // region! GetFileSize indicates that the handle is invalid. Thus, we 54 // region! GetFileSize indicates that the handle is invalid. Thus, we
55 // conservatively set the size to the maximum and hope that the renderer 55 // conservatively set the size to the maximum and hope that the renderer
56 // isn't about to ask us to read off the end of the array. 56 // isn't about to ask us to read off the end of the array.
57 dib->size_ = std::numeric_limits<size_t>::max(); 57 dib->size_ = std::numeric_limits<size_t>::max();
58 58
59 return dib; 59 return dib;
60 } 60 }
61 61
62 skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
63 return new skia::PlatformCanvas(w, h, true, handle());
64 }
65
62 void* TransportDIB::memory() const { 66 void* TransportDIB::memory() const {
63 return shared_memory_.memory(); 67 return shared_memory_.memory();
64 } 68 }
65 69
66 TransportDIB::Handle TransportDIB::handle() const { 70 TransportDIB::Handle TransportDIB::handle() const {
67 return shared_memory_.handle(); 71 return shared_memory_.handle();
68 } 72 }
69 73
70 TransportDIB::Id TransportDIB::id() const { 74 TransportDIB::Id TransportDIB::id() const {
71 return Id(shared_memory_.handle(), sequence_num_); 75 return Id(shared_memory_.handle(), sequence_num_);
72 } 76 }
OLDNEW
« no previous file with comments | « chrome/common/transport_dib_mac.cc ('k') | chrome/renderer/render_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698