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

Side by Side Diff: Source/platform/graphics/Canvas2DLayerBridge.h

Issue 369043003: Let canvas decide how to handle the case of resource lost reported by client: 2D part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add default parameter value for mailboxReleased interface Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 class PLATFORM_EXPORT Canvas2DLayerBridge : public blink::WebExternalTextureLaye rClient, public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNod e<Canvas2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> { 54 class PLATFORM_EXPORT Canvas2DLayerBridge : public blink::WebExternalTextureLaye rClient, public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNod e<Canvas2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> {
55 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); 55 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
56 public: 56 public:
57 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, OpacityMode, i nt msaaSampleCount); 57 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, OpacityMode, i nt msaaSampleCount);
58 58
59 virtual ~Canvas2DLayerBridge(); 59 virtual ~Canvas2DLayerBridge();
60 60
61 // blink::WebExternalTextureLayerClient implementation. 61 // blink::WebExternalTextureLayerClient implementation.
62 virtual bool prepareMailbox(blink::WebExternalTextureMailbox*, blink::WebExt ernalBitmap*) OVERRIDE; 62 virtual bool prepareMailbox(blink::WebExternalTextureMailbox*, blink::WebExt ernalBitmap*) OVERRIDE;
63 virtual void mailboxReleased(const blink::WebExternalTextureMailbox&) OVERRI DE; 63 virtual void mailboxReleased(const blink::WebExternalTextureMailbox&, bool) OVERRIDE;
64 64
65 // SkDeferredCanvas::NotificationClient implementation 65 // SkDeferredCanvas::NotificationClient implementation
66 virtual void prepareForDraw() OVERRIDE; 66 virtual void prepareForDraw() OVERRIDE;
67 virtual void storageAllocatedForRecordingChanged(size_t) OVERRIDE; 67 virtual void storageAllocatedForRecordingChanged(size_t) OVERRIDE;
68 virtual void flushedDrawCommands() OVERRIDE; 68 virtual void flushedDrawCommands() OVERRIDE;
69 virtual void skippedPendingDrawCommands() OVERRIDE; 69 virtual void skippedPendingDrawCommands() OVERRIDE;
70 70
71 // ImageBufferSurface implementation 71 // ImageBufferSurface implementation
72 void willUse(); 72 void willUse();
73 void willReadback(); 73 void willReadback();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }; 137 };
138 MailboxInfo* createMailboxInfo(); 138 MailboxInfo* createMailboxInfo();
139 MailboxInfo* releasedMailboxInfo(); 139 MailboxInfo* releasedMailboxInfo();
140 140
141 uint32_t m_lastImageId; 141 uint32_t m_lastImageId;
142 Vector<MailboxInfo> m_mailboxes; 142 Vector<MailboxInfo> m_mailboxes;
143 int m_releasedMailboxInfoIndex; 143 int m_releasedMailboxInfoIndex;
144 }; 144 };
145 } 145 }
146 #endif 146 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698