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

Side by Side Diff: chrome/common/transport_dib_mac.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_linux.cc ('k') | chrome/common/transport_dib_win.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 "chrome/common/transport_dib.h" 5 #include "chrome/common/transport_dib.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include "base/eintr_wrapper.h" 10 #include "base/eintr_wrapper.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 delete dib; 45 delete dib;
46 HANDLE_EINTR(close(handle.fd)); 46 HANDLE_EINTR(close(handle.fd));
47 return false; 47 return false;
48 } 48 }
49 49
50 dib->size_ = st.st_size; 50 dib->size_ = st.st_size;
51 51
52 return dib; 52 return dib;
53 } 53 }
54 54
55 skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
56 return new skia::PlatformCanvas(w, h, true,
57 reinterpret_cast<uint8_t*>(dib->memory()));
58 }
59
55 void* TransportDIB::memory() const { 60 void* TransportDIB::memory() const {
56 return shared_memory_.memory(); 61 return shared_memory_.memory();
57 } 62 }
58 63
59 TransportDIB::Id TransportDIB::id() const { 64 TransportDIB::Id TransportDIB::id() const {
60 return shared_memory_.id(); 65 return shared_memory_.id();
61 } 66 }
62 67
63 TransportDIB::Handle TransportDIB::handle() const { 68 TransportDIB::Handle TransportDIB::handle() const {
64 return shared_memory_.handle(); 69 return shared_memory_.handle();
65 } 70 }
OLDNEW
« no previous file with comments | « chrome/common/transport_dib_linux.cc ('k') | chrome/common/transport_dib_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698