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

Side by Side Diff: skia/ext/bitmap_platform_device_win.h

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/bitmap_platform_device_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "skia/ext/platform_device.h" 10 #include "skia/ext/platform_device.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque); 43 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque);
44 44
45 virtual ~BitmapPlatformDevice(); 45 virtual ~BitmapPlatformDevice();
46 46
47 // PlatformDevice overrides 47 // PlatformDevice overrides
48 // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The 48 // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
49 // bitmap DC is lazy created. 49 // bitmap DC is lazy created.
50 virtual PlatformSurface BeginPlatformPaint() override; 50 virtual PlatformSurface BeginPlatformPaint() override;
51 virtual void EndPlatformPaint() override; 51 virtual void EndPlatformPaint() override;
52 52
53 virtual void DrawToNativeContext(HDC dc, int x, int y,
54 const RECT* src_rect) override;
55
56 // Loads the given transform and clipping region into the HDC. This is 53 // Loads the given transform and clipping region into the HDC. This is
57 // overridden from SkBaseDevice. 54 // overridden from SkBaseDevice.
58 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, 55 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
59 const SkClipStack&) override; 56 const SkClipStack&) override;
60 57
58 void DrawToHDC(HDC dc, int x, int y, const RECT* src_rect) override;
59
61 protected: 60 protected:
62 // Flushes the Windows device context so that the pixel data can be accessed 61 // Flushes the Windows device context so that the pixel data can be accessed
63 // directly by Skia. Overridden from SkBaseDevice, this is called when Skia 62 // directly by Skia. Overridden from SkBaseDevice, this is called when Skia
64 // starts accessing pixel data. 63 // starts accessing pixel data.
65 virtual const SkBitmap& onAccessBitmap() override; 64 virtual const SkBitmap& onAccessBitmap() override;
66 65
67 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) 66 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info)
68 override; 67 override;
69 68
70 private: 69 private:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #ifdef SK_DEBUG 112 #ifdef SK_DEBUG
114 int begin_paint_count_; 113 int begin_paint_count_;
115 #endif 114 #endif
116 115
117 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); 116 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
118 }; 117 };
119 118
120 } // namespace skia 119 } // namespace skia
121 120
122 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 121 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698