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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp

Issue 13638008: Blink API to allow mailbox usage with texture layers for WebGL and Canvas2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 updater.appendCopy(m_drawingBuffer->colorBuffer(), textureId, m_draw ingBuffer->size()); 196 updater.appendCopy(m_drawingBuffer->colorBuffer(), textureId, m_draw ingBuffer->size());
197 197
198 return textureId; 198 return textureId;
199 } 199 }
200 200
201 virtual WebKit::WebGraphicsContext3D* context() OVERRIDE 201 virtual WebKit::WebGraphicsContext3D* context() OVERRIDE
202 { 202 {
203 return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_drawingBu ffer->graphicsContext3D()); 203 return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_drawingBu ffer->graphicsContext3D());
204 } 204 }
205 205
206 virtual bool prepareMailbox(WebKit::WebExternalTextureMailbox*) OVERRIDE { r eturn false; }
207 virtual void mailboxReleased(const WebKit::WebExternalTextureMailbox&) OVERR IDE { }
208
206 void clearTextureId() 209 void clearTextureId()
207 { 210 {
208 m_layer->setTextureId(0); 211 m_layer->setTextureId(0);
209 } 212 }
210 213
211 WebKit::WebLayer* layer() { return m_layer->layer(); } 214 WebKit::WebLayer* layer() { return m_layer->layer(); }
212 215
213 private: 216 private:
214 DrawingBuffer* m_drawingBuffer; 217 DrawingBuffer* m_drawingBuffer;
215 OwnPtr<WebKit::WebExternalTextureLayer> m_layer; 218 OwnPtr<WebKit::WebExternalTextureLayer> m_layer;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 void DrawingBuffer::clearPlatformLayer() 257 void DrawingBuffer::clearPlatformLayer()
255 { 258 {
256 if (m_private) 259 if (m_private)
257 m_private->clearTextureId(); 260 m_private->clearTextureId();
258 261
259 m_context->flush(); 262 m_context->flush();
260 } 263 }
261 #endif 264 #endif
262 265
263 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698