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

Unified Diff: third_party/WebKit/Source/platform/graphics/TextureHolder.h

Issue 2455983005: Refactor AcceleratedStaticBitmapImage (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/TextureHolder.h
diff --git a/third_party/WebKit/Source/platform/graphics/TextureHolder.h b/third_party/WebKit/Source/platform/graphics/TextureHolder.h
new file mode 100644
index 0000000000000000000000000000000000000000..18d64b1856baa29cd2ed3d9c981050e4e87682ea
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/TextureHolder.h
@@ -0,0 +1,38 @@
+// Copyright 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 TextureHolder_h
+#define TextureHolder_h
+
+#include "gpu/command_buffer/common/mailbox.h"
+#include "gpu/command_buffer/common/sync_token.h"
+#include "platform/PlatformExport.h"
+#include "platform/geometry/IntSize.h"
+#include "third_party/skia/include/core/SkImage.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
+
+namespace blink {
+
+class WebThread;
+
+class PLATFORM_EXPORT TextureHolder {
+ public:
+ virtual bool isSkiaTextureHolder() = 0;
+ virtual unsigned sharedContextId() = 0;
+ virtual gpu::Mailbox getMailbox() = 0;
+ virtual gpu::SyncToken getSyncToken() = 0;
+ virtual IntSize getMailboxSize() = 0;
+ virtual void releaseImageThreadSafe() = 0;
+ virtual sk_sp<SkImage> getSkImage() = 0;
+ virtual WebThread* getImageThread() = 0;
+ virtual IntSize size() const = 0;
+
+ virtual void setSharedContextId(unsigned) = 0;
+ virtual void setImageThread(WebThread*) = 0;
+ virtual void deleteTexture(const int8_t*) = 0;
+};
+
+} // namespace blink
+
+#endif // TextureHolder_h

Powered by Google App Engine
This is Rietveld 408576698