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

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

Issue 1184673003: Fix unit test style in Source/platform/, part 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
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 23 matching lines...) Expand all
34 #include "public/platform/WebExternalTextureMailbox.h" 34 #include "public/platform/WebExternalTextureMailbox.h"
35 #include "third_party/khronos/GLES2/gl2.h" 35 #include "third_party/khronos/GLES2/gl2.h"
36 #include "third_party/skia/include/core/SkImage.h" 36 #include "third_party/skia/include/core/SkImage.h"
37 #include "third_party/skia/include/utils/SkDeferredCanvas.h" 37 #include "third_party/skia/include/utils/SkDeferredCanvas.h"
38 #include "wtf/Deque.h" 38 #include "wtf/Deque.h"
39 #include "wtf/DoublyLinkedList.h" 39 #include "wtf/DoublyLinkedList.h"
40 #include "wtf/PassOwnPtr.h" 40 #include "wtf/PassOwnPtr.h"
41 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 43
44 class Canvas2DLayerBridgeTest;
45
46 namespace blink { 44 namespace blink {
47 45
46 class Canvas2DLayerBridgeTest;
48 class ImageBuffer; 47 class ImageBuffer;
49 class WebGraphicsContext3D; 48 class WebGraphicsContext3D;
50 class WebGraphicsContext3DProvider; 49 class WebGraphicsContext3DProvider;
51 50
52 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient , public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNode<Canva s2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> { 51 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient , public SkDeferredCanvas::NotificationClient, public DoublyLinkedListNode<Canva s2DLayerBridge>, public RefCounted<Canvas2DLayerBridge> {
53 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); 52 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
54 public: 53 public:
55 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, OpacityMode, i nt msaaSampleCount); 54 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, OpacityMode, i nt msaaSampleCount);
56 55
57 virtual ~Canvas2DLayerBridge(); 56 virtual ~Canvas2DLayerBridge();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 bool m_didRecordDrawCommand; 108 bool m_didRecordDrawCommand;
110 bool m_isSurfaceValid; 109 bool m_isSurfaceValid;
111 int m_framesPending; 110 int m_framesPending;
112 int m_framesSinceMailboxRelease; 111 int m_framesSinceMailboxRelease;
113 bool m_destructionInProgress; 112 bool m_destructionInProgress;
114 bool m_rateLimitingEnabled; 113 bool m_rateLimitingEnabled;
115 SkFilterQuality m_filterQuality; 114 SkFilterQuality m_filterQuality;
116 bool m_isHidden; 115 bool m_isHidden;
117 116
118 friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>; 117 friend class WTF::DoublyLinkedListNode<Canvas2DLayerBridge>;
119 friend class ::Canvas2DLayerBridgeTest; 118 friend class Canvas2DLayerBridgeTest;
120 Canvas2DLayerBridge* m_next; 119 Canvas2DLayerBridge* m_next;
121 Canvas2DLayerBridge* m_prev; 120 Canvas2DLayerBridge* m_prev;
122 121
123 struct MailboxInfo { 122 struct MailboxInfo {
124 WebExternalTextureMailbox m_mailbox; 123 WebExternalTextureMailbox m_mailbox;
125 RefPtr<SkImage> m_image; 124 RefPtr<SkImage> m_image;
126 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge; 125 RefPtr<Canvas2DLayerBridge> m_parentLayerBridge;
127 126
128 MailboxInfo(const MailboxInfo&); 127 MailboxInfo(const MailboxInfo&);
129 MailboxInfo() {} 128 MailboxInfo() {}
130 }; 129 };
131 130
132 uint32_t m_lastImageId; 131 uint32_t m_lastImageId;
133 132
134 enum { 133 enum {
135 // We should normally not have more that two active mailboxes at a time, 134 // We should normally not have more that two active mailboxes at a time,
136 // but sometime we may have three due to the async nature of mailbox han dling. 135 // but sometime we may have three due to the async nature of mailbox han dling.
137 MaxActiveMailboxes = 3, 136 MaxActiveMailboxes = 3,
138 }; 137 };
139 138
140 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; 139 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes;
141 GLenum m_lastFilter; 140 GLenum m_lastFilter;
142 OpacityMode m_opacityMode; 141 OpacityMode m_opacityMode;
143 }; 142 };
144 143
145 } // namespace blink 144 } // namespace blink
146 145
147 #endif 146 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698