Index: third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContextFactory.h |
diff --git a/third_party/WebKit/Source/platform/graphics/skia/ImagePixelLocker.h b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContextFactory.h |
similarity index 20% |
copy from third_party/WebKit/Source/platform/graphics/skia/ImagePixelLocker.h |
copy to third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContextFactory.h |
index 3b486dfe375deaba7086108fc93393f9376f7f43..9892cc7c87a69581afd0d6cf96783c7d04756e03 100644 |
--- a/third_party/WebKit/Source/platform/graphics/skia/ImagePixelLocker.h |
+++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContextFactory.h |
@@ -1,36 +1,31 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef ImagePixelLocker_h |
-#define ImagePixelLocker_h |
+#ifndef OffscreenCanvasRenderingContextFactory_h |
+#define OffscreenCanvasRenderingContextFactory_h |
-#include "platform/heap/Heap.h" |
-#include "third_party/skia/include/core/SkImageInfo.h" |
-#include "third_party/skia/include/core/SkPixmap.h" |
#include "wtf/Allocator.h" |
-#include "wtf/Noncopyable.h" |
#include "wtf/PassRefPtr.h" |
-#include "wtf/RefPtr.h" |
- |
-class SkImage; |
namespace blink { |
-class ImagePixelLocker final { |
- DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
- WTF_MAKE_NONCOPYABLE(ImagePixelLocker); |
-public: |
- ImagePixelLocker(PassRefPtr<const SkImage>, SkAlphaType, SkColorType); |
+class CanvasContextCreationAttributes; |
+class OffscreenCanvas; |
+class OffscreenCanvasRenderingContext; |
- const void* pixels() const { return m_pixels; } |
+class OffscreenCanvasRenderingContextFactory { |
+ USING_FAST_MALLOC(OffscreenCanvasRenderingContextFactory); |
+ WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContextFactory); |
+public: |
+ OffscreenCanvasRenderingContextFactory() = default; |
+ virtual ~OffscreenCanvasRenderingContextFactory() { } |
-private: |
- const RefPtr<const SkImage> m_image; |
- const void* m_pixels; |
- SkAutoPixmapStorage m_pixelStorage; |
+ virtual OffscreenCanvasRenderingContext* create(OffscreenCanvas*, const CanvasContextCreationAttributes&) = 0; |
+ virtual OffscreenCanvasRenderingContext::ContextType contextType() const = 0; |
+ virtual void onError(OffscreenCanvas*, const String& error) = 0; |
}; |
} // namespace blink |
-#endif |
+#endif // OffscreenCanvasRenderingContextFactory_h |