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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h

Issue 10690121: Merge 121076 - [chromium] LayerRendererChromium is not getting visibility messages in single thread… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void setNeedsRedraw(); 68 void setNeedsRedraw();
69 69
70 struct FramePlane { 70 struct FramePlane {
71 unsigned textureId; 71 unsigned textureId;
72 IntSize size; 72 IntSize size;
73 GC3Denum format; 73 GC3Denum format;
74 IntSize visibleSize; 74 IntSize visibleSize;
75 75
76 FramePlane() : textureId(0) { } 76 FramePlane() : textureId(0) { }
77 77
78 bool allocateData(CCRenderer*); 78 bool allocateData(CCGraphicsContext*);
79 void freeData(CCRenderer*); 79 void freeData(CCGraphicsContext*);
80 }; 80 };
81 81
82 private: 82 private:
83 CCVideoLayerImpl(int, WebKit::WebVideoFrameProvider*); 83 CCVideoLayerImpl(int, WebKit::WebVideoFrameProvider*);
84 84
85 static IntSize computeVisibleSize(const WebKit::WebVideoFrame&, unsigned pla ne); 85 static IntSize computeVisibleSize(const WebKit::WebVideoFrame&, unsigned pla ne);
86 virtual const char* layerTypeAsString() const OVERRIDE { return "VideoLayer" ; } 86 virtual const char* layerTypeAsString() const OVERRIDE { return "VideoLayer" ; }
87 87
88 void willDrawInternal(CCRenderer*, CCGraphicsContext*); 88 void willDrawInternal(CCRenderer*, CCGraphicsContext*);
89 bool allocatePlaneData(CCRenderer*); 89 bool allocatePlaneData(CCRenderer*, CCGraphicsContext*);
90 bool copyPlaneData(CCRenderer*, CCGraphicsContext*); 90 bool copyPlaneData(CCRenderer*, CCGraphicsContext*);
91 void freePlaneData(CCRenderer*); 91 void freePlaneData(CCGraphicsContext*);
92 void freeUnusedPlaneData(CCRenderer*); 92 void freeUnusedPlaneData(CCGraphicsContext*);
93 93
94 // Guards the destruction of m_provider and the frame that it provides 94 // Guards the destruction of m_provider and the frame that it provides
95 Mutex m_providerMutex; 95 Mutex m_providerMutex;
96 WebKit::WebVideoFrameProvider* m_provider; 96 WebKit::WebVideoFrameProvider* m_provider;
97 97
98 WebKit::WebTransformationMatrix m_streamTextureMatrix; 98 WebKit::WebTransformationMatrix m_streamTextureMatrix;
99 99
100 WebKit::WebVideoFrame* m_frame; 100 WebKit::WebVideoFrame* m_frame;
101 GC3Denum m_format; 101 GC3Denum m_format;
102 102
103 // Each index in this array corresponds to a plane in WebKit::WebVideoFrame. 103 // Each index in this array corresponds to a plane in WebKit::WebVideoFrame.
104 FramePlane m_framePlanes[WebKit::WebVideoFrame::maxPlanes]; 104 FramePlane m_framePlanes[WebKit::WebVideoFrame::maxPlanes];
105 }; 105 };
106 106
107 } 107 }
108 108
109 #endif // CCVideoLayerImpl_h 109 #endif // CCVideoLayerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698