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

Side by Side Diff: chrome/browser/renderer_host/backing_store_win.h

Issue 3834003: On Windows, create a new TransportDIB::Handle struct which includes the file (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_
6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/browser/renderer_host/backing_store.h" 12 #include "chrome/browser/renderer_host/backing_store.h"
13 13
14 class BackingStoreWin : public BackingStore { 14 class BackingStoreWin : public BackingStore {
15 public: 15 public:
16 BackingStoreWin(RenderWidgetHost* widget, const gfx::Size& size); 16 BackingStoreWin(RenderWidgetHost* widget, const gfx::Size& size);
17 virtual ~BackingStoreWin(); 17 virtual ~BackingStoreWin();
18 18
19 HDC hdc() { return hdc_; } 19 HDC hdc() { return hdc_; }
20 20
21 // Returns true if we should convert to the monitor profile when painting. 21 // Returns true if we should convert to the monitor profile when painting.
22 static bool ColorManagementEnabled(); 22 static bool ColorManagementEnabled();
23 23
24 // BackingStore implementation. 24 // BackingStore implementation.
25 virtual size_t MemorySize(); 25 virtual size_t MemorySize();
26 virtual void PaintToBackingStore(RenderProcessHost* process, 26 virtual void PaintToBackingStore(RenderProcessHost* process,
27 TransportDIB::Id bitmap, 27 TransportDIB::Id dib_id,
28 TransportDIB::Handle dib_handle,
28 const gfx::Rect& bitmap_rect, 29 const gfx::Rect& bitmap_rect,
29 const std::vector<gfx::Rect>& copy_rects, 30 const std::vector<gfx::Rect>& copy_rects,
30 bool* painted_synchronously); 31 bool* painted_synchronously);
31 virtual bool CopyFromBackingStore(const gfx::Rect& rect, 32 virtual bool CopyFromBackingStore(const gfx::Rect& rect,
32 skia::PlatformCanvas* output); 33 skia::PlatformCanvas* output);
33 virtual void ScrollBackingStore(int dx, int dy, 34 virtual void ScrollBackingStore(int dx, int dy,
34 const gfx::Rect& clip_rect, 35 const gfx::Rect& clip_rect,
35 const gfx::Size& view_size); 36 const gfx::Size& view_size);
36 37
37 private: 38 private:
38 // The backing store dc. 39 // The backing store dc.
39 HDC hdc_; 40 HDC hdc_;
40 41
41 // Handle to the backing store dib. 42 // Handle to the backing store dib.
42 HANDLE backing_store_dib_; 43 HANDLE backing_store_dib_;
43 44
44 // Handle to the original bitmap in the dc. 45 // Handle to the original bitmap in the dc.
45 HANDLE original_bitmap_; 46 HANDLE original_bitmap_;
46 47
47 // Number of bits per pixel of the screen. 48 // Number of bits per pixel of the screen.
48 int color_depth_; 49 int color_depth_;
49 50
50 DISALLOW_COPY_AND_ASSIGN(BackingStoreWin); 51 DISALLOW_COPY_AND_ASSIGN(BackingStoreWin);
51 }; 52 };
52 53
53 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_ 54 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698