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

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

Issue 2340813006: accessBitmap is no longer called/needed (Closed)
Patch Set: peek at entire pixels Created 4 years, 3 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) 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/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "skia/ext/platform_device.h" 10 #include "skia/ext/platform_device.h"
(...skipping 23 matching lines...) Expand all
34 bool is_opaque, HANDLE shared_section, 34 bool is_opaque, HANDLE shared_section,
35 bool do_clear = false); 35 bool do_clear = false);
36 36
37 // Create a BitmapPlatformDevice with no shared section. The bitmap is not 37 // Create a BitmapPlatformDevice with no shared section. The bitmap is not
38 // initialized to 0. 38 // initialized to 0.
39 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque); 39 static BitmapPlatformDevice* Create(int width, int height, bool is_opaque);
40 40
41 ~BitmapPlatformDevice() override; 41 ~BitmapPlatformDevice() override;
42 42
43 protected: 43 protected:
44 // Flushes the Windows device context so that the pixel data can be accessed
45 // directly by Skia. Overridden from SkBaseDevice, this is called when Skia
46 // starts accessing pixel data.
47 const SkBitmap& onAccessBitmap() override;
48
49 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; 44 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
50 45
51 private: 46 private:
52 // PlatformDevice override 47 // PlatformDevice override
53 // 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
54 // bitmap DC may be lazily created. 49 // bitmap DC may be lazily created.
55 PlatformSurface BeginPlatformPaint(const SkMatrix& transform, 50 PlatformSurface BeginPlatformPaint(const SkMatrix& transform,
56 const SkIRect& clip_bounds) override; 51 const SkIRect& clip_bounds) override;
57 52
58 // Private constructor. 53 // Private constructor.
(...skipping 20 matching lines...) Expand all
79 // when |hbitmap_| is NULL (will be a NOP). 74 // when |hbitmap_| is NULL (will be a NOP).
80 void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds); 75 void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds);
81 76
82 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); 77 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
83 friend class ScopedPlatformPaint; 78 friend class ScopedPlatformPaint;
84 }; 79 };
85 80
86 } // namespace skia 81 } // namespace skia
87 82
88 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 83 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698