| OLD | NEW |
| 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 // TODO(jam): remove this file when all files have been converted. |
| 10 | 10 #include "content/browser/renderer_host/backing_store_win.h" |
| 11 #include "base/basictypes.h" | |
| 12 #include "chrome/browser/renderer_host/backing_store.h" | |
| 13 | |
| 14 class BackingStoreWin : public BackingStore { | |
| 15 public: | |
| 16 BackingStoreWin(RenderWidgetHost* widget, const gfx::Size& size); | |
| 17 virtual ~BackingStoreWin(); | |
| 18 | |
| 19 HDC hdc() { return hdc_; } | |
| 20 | |
| 21 // Returns true if we should convert to the monitor profile when painting. | |
| 22 static bool ColorManagementEnabled(); | |
| 23 | |
| 24 // BackingStore implementation. | |
| 25 virtual size_t MemorySize(); | |
| 26 virtual void PaintToBackingStore(RenderProcessHost* process, | |
| 27 TransportDIB::Id bitmap, | |
| 28 const gfx::Rect& bitmap_rect, | |
| 29 const std::vector<gfx::Rect>& copy_rects); | |
| 30 virtual bool CopyFromBackingStore(const gfx::Rect& rect, | |
| 31 skia::PlatformCanvas* output); | |
| 32 virtual void ScrollBackingStore(int dx, int dy, | |
| 33 const gfx::Rect& clip_rect, | |
| 34 const gfx::Size& view_size); | |
| 35 | |
| 36 private: | |
| 37 // The backing store dc. | |
| 38 HDC hdc_; | |
| 39 | |
| 40 // Handle to the backing store dib. | |
| 41 HANDLE backing_store_dib_; | |
| 42 | |
| 43 // Handle to the original bitmap in the dc. | |
| 44 HANDLE original_bitmap_; | |
| 45 | |
| 46 // Number of bits per pixel of the screen. | |
| 47 int color_depth_; | |
| 48 | |
| 49 DISALLOW_COPY_AND_ASSIGN(BackingStoreWin); | |
| 50 }; | |
| 51 | 11 |
| 52 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_ | 12 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_WIN_H_ |
| OLD | NEW |