| 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..dd6caed6de594fd4328174e28312480676a9b679
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/TextureHolder.h
|
| @@ -0,0 +1,52 @@
|
| +// 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 ~TextureHolder() {}
|
| +
|
| + // Methods overrided by all sub-classes
|
| + virtual bool isSkiaTextureHolder() = 0;
|
| + virtual bool isMailboxTextureHolder() = 0;
|
| + virtual unsigned sharedContextId() = 0;
|
| + virtual WebThread* imageThread() = 0;
|
| + virtual IntSize size() const = 0;
|
| +
|
| + // Methods overrided by MailboxTextureHolder
|
| + virtual gpu::Mailbox mailbox() {
|
| + NOTREACHED();
|
| + return gpu::Mailbox();
|
| + }
|
| + virtual gpu::SyncToken syncToken() {
|
| + NOTREACHED();
|
| + return gpu::SyncToken();
|
| + }
|
| + virtual void updateSyncToken(gpu::SyncToken) { NOTREACHED(); }
|
| +
|
| + // Methods overrided by SkiaTextureHolder
|
| + virtual sk_sp<SkImage> skImage() {
|
| + NOTREACHED();
|
| + return nullptr;
|
| + }
|
| + virtual void setSharedContextId(unsigned) { NOTREACHED(); }
|
| + virtual void setImageThread(WebThread*) { NOTREACHED(); }
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // TextureHolder_h
|
|
|