OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_GFX_CANVAS_SKIA_PAINT_WIN_H_ |
| 6 #define UI_GFX_CANVAS_SKIA_PAINT_WIN_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/scoped_ptr.h" |
| 10 #include "ui/gfx/canvas.h" |
| 11 |
| 12 namespace gfx { |
| 13 |
| 14 class CanvasSkia; |
| 15 |
| 16 class CanvasSkiaPaint : public CanvasPaint { |
| 17 public: |
| 18 explicit CanvasSkiaPaint(gfx::NativeView view); |
| 19 virtual ~CanvasSkiaPaint(); |
| 20 |
| 21 // Overridden from CanvasPaint: |
| 22 virtual bool IsValid() const; |
| 23 virtual gfx::Rect GetInvalidRect() const; |
| 24 virtual Canvas* AsCanvas(); |
| 25 |
| 26 private: |
| 27 bool InitCanvas(); |
| 28 |
| 29 HWND hwnd_; |
| 30 HDC paint_dc_; |
| 31 PAINTSTRUCT ps_; |
| 32 |
| 33 scoped_ptr<CanvasSkia> canvas_; |
| 34 }; |
| 35 |
| 36 } // namespace gfx |
| 37 #endif // UI_GFX_CANVAS_SKIA_PAINT_WIN_H_ |
OLD | NEW |