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

Side by Side Diff: cc/CCTextureUpdateQueue.cpp

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « cc/CCTextureUpdateQueue.h ('k') | cc/CCThread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 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 #include "config.h"
6
7 #if USE(ACCELERATED_COMPOSITING)
8
9 #include "CCTextureUpdateQueue.h"
10
11 namespace cc {
12
13 CCTextureUpdateQueue::CCTextureUpdateQueue()
14 {
15 }
16
17 CCTextureUpdateQueue::~CCTextureUpdateQueue()
18 {
19 }
20
21 void CCTextureUpdateQueue::appendFullUpload(TextureUploader::Parameters upload)
22 {
23 m_fullEntries.append(upload);
24 }
25
26 void CCTextureUpdateQueue::appendPartialUpload(TextureUploader::Parameters uploa d)
27 {
28 m_partialEntries.append(upload);
29 }
30
31 void CCTextureUpdateQueue::appendCopy(TextureCopier::Parameters copy)
32 {
33 m_copyEntries.append(copy);
34 }
35
36 void CCTextureUpdateQueue::clearUploadsToEvictedResources()
37 {
38 clearUploadsToEvictedResources(m_fullEntries);
39 clearUploadsToEvictedResources(m_partialEntries);
40 }
41
42 void CCTextureUpdateQueue::clearUploadsToEvictedResources(Deque<TextureUploader: :Parameters>& entryQueue)
43 {
44 Deque<TextureUploader::Parameters> temp;
45 entryQueue.swap(temp);
46 while (temp.size()) {
47 TextureUploader::Parameters upload = temp.takeFirst();
48 if (!upload.texture->backingResourceWasEvicted())
49 entryQueue.append(upload);
50 }
51 }
52
53 TextureUploader::Parameters CCTextureUpdateQueue::takeFirstFullUpload()
54 {
55 return m_fullEntries.takeFirst();
56 }
57
58 TextureUploader::Parameters CCTextureUpdateQueue::takeFirstPartialUpload()
59 {
60 return m_partialEntries.takeFirst();
61 }
62
63 TextureCopier::Parameters CCTextureUpdateQueue::takeFirstCopy()
64 {
65 return m_copyEntries.takeFirst();
66 }
67
68 bool CCTextureUpdateQueue::hasMoreUpdates() const
69 {
70 return m_fullEntries.size() || m_partialEntries.size() || m_copyEntries.size ();
71 }
72
73 }
74
75 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/CCTextureUpdateQueue.h ('k') | cc/CCThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698