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

Unified Diff: webkit/port/platform/graphics/skia/public/BitmapPlatformDeviceLinux.h

Issue 11244: Move PlatformCanvas and PlatformDevice from base/gfx to webkit/port. I left h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webkit/port/platform/graphics/skia/public/BitmapPlatformDeviceLinux.h
===================================================================
--- webkit/port/platform/graphics/skia/public/BitmapPlatformDeviceLinux.h (revision 0)
+++ webkit/port/platform/graphics/skia/public/BitmapPlatformDeviceLinux.h (working copy)
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_GFX_BITMAP_PLATFORM_DEVICE_LINUX_H_
-#define BASE_GFX_BITMAP_PLATFORM_DEVICE_LINUX_H_
+#ifndef BitmapPlatformDeviceLinux_h
+#define BitmapPlatformDeviceLinux_h
-#include "base/gfx/platform_device_linux.h"
+#include "PLatformDeviceLinux.h"
#include "base/ref_counted.h"
typedef struct _cairo_surface cairo_surface_t;
@@ -55,6 +55,9 @@
// case we'll probably create the buffer from a precreated region of memory.
// -----------------------------------------------------------------------------
class BitmapPlatformDeviceLinux : public PlatformDeviceLinux {
+ // A reference counted cairo surface
+ class BitmapPlatformDeviceLinuxData;
+
public:
/// Static constructor. I don't understand this, it's just a copy of the mac
static BitmapPlatformDeviceLinux* Create(int width, int height,
@@ -65,9 +68,11 @@
// we ever have to share state between some native drawing UI and Skia, like
// the Windows and Mac versions of this class do.
//
- // This object takes ownership of @surface.
- BitmapPlatformDeviceLinux(const SkBitmap& other, cairo_surface_t* surface);
+ // This object takes ownership of @data.
+ BitmapPlatformDeviceLinux(const SkBitmap& other,
+ BitmapPlatformDeviceLinuxData* data);
virtual ~BitmapPlatformDeviceLinux();
+ BitmapPlatformDeviceLinux& operator=(const BitmapPlatformDeviceLinux& other);
// A stub copy constructor. Needs to be properly implemented.
BitmapPlatformDeviceLinux(const BitmapPlatformDeviceLinux& other);
@@ -75,12 +80,12 @@
// Bitmaps aren't vector graphics.
virtual bool IsVectorial() { return false; }
- cairo_surface_t* surface() const { return surface_; }
+ cairo_surface_t* surface() const;
private:
- cairo_surface_t* surface_;
+ scoped_refptr<BitmapPlatformDeviceLinuxData> data_;
};
} // namespace gfx
-#endif // BASE_GFX_BITMAP_PLATFORM_DEVICE_LINUX_H_
+#endif // BitmapPlatformDeviceLinux_h
Property changes on: webkit\port\platform\graphics\skia\public\BitmapPlatformDeviceLinux.h
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/gfx/bitmap_platform_device_linux.h:r69-2775

Powered by Google App Engine
This is Rietveld 408576698