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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/TextureHolder.h

Issue 2455983005: Refactor AcceleratedStaticBitmapImage (Closed)
Patch Set: minor clean up Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef TextureHolder_h
6 #define TextureHolder_h
7
8 #include "gpu/command_buffer/common/mailbox.h"
9 #include "gpu/command_buffer/common/sync_token.h"
10 #include "platform/PlatformExport.h"
11 #include "platform/geometry/IntSize.h"
12 #include "third_party/skia/include/core/SkImage.h"
13 #include "third_party/skia/include/core/SkRefCnt.h"
14
15 namespace blink {
16
17 class WebThread;
18
19 class PLATFORM_EXPORT TextureHolder {
20 public:
21 virtual ~TextureHolder() {}
22
23 // Methods overrided by all sub-classes
24 virtual bool isSkiaTextureHolder() = 0;
25 virtual bool isMailboxTextureHolder() = 0;
26 virtual unsigned sharedContextId() = 0;
27 virtual WebThread* imageThread() = 0;
28 virtual IntSize size() const = 0;
29
30 // Methods overrided by MailboxTextureHolder
31 virtual gpu::Mailbox mailbox() {
32 NOTREACHED();
33 return gpu::Mailbox();
34 }
35 virtual gpu::SyncToken syncToken() {
36 NOTREACHED();
37 return gpu::SyncToken();
38 }
39 virtual void updateSyncToken(gpu::SyncToken) { NOTREACHED(); }
40
41 // Methods overrided by SkiaTextureHolder
42 virtual sk_sp<SkImage> skImage() {
43 NOTREACHED();
44 return nullptr;
45 }
46 virtual void setSharedContextId(unsigned) { NOTREACHED(); }
47 virtual void setImageThread(WebThread*) { NOTREACHED(); }
48 };
49
50 } // namespace blink
51
52 #endif // TextureHolder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698