blob: 1619ab2c676effdf883dd11d25239bc2d27cf213 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#if USE(ACCELERATED_COMPOSITING)
#include "CCTextureUpdateQueue.h"
namespace cc {
CCTextureUpdateQueue::CCTextureUpdateQueue()
{
}
CCTextureUpdateQueue::~CCTextureUpdateQueue()
{
}
void CCTextureUpdateQueue::appendFullUpload(TextureUploader::Parameters upload)
{
m_fullEntries.append(upload);
}
void CCTextureUpdateQueue::appendPartialUpload(TextureUploader::Parameters upload)
{
m_partialEntries.append(upload);
}
void CCTextureUpdateQueue::appendCopy(TextureCopier::Parameters copy)
{
m_copyEntries.append(copy);
}
void CCTextureUpdateQueue::clearUploads()
{
m_fullEntries.clear();
m_partialEntries.clear();
}
TextureUploader::Parameters CCTextureUpdateQueue::takeFirstFullUpload()
{
return m_fullEntries.takeFirst();
}
TextureUploader::Parameters CCTextureUpdateQueue::takeFirstPartialUpload()
{
return m_partialEntries.takeFirst();
}
TextureCopier::Parameters CCTextureUpdateQueue::takeFirstCopy()
{
return m_copyEntries.takeFirst();
}
bool CCTextureUpdateQueue::hasMoreUpdates() const
{
return m_fullEntries.size() || m_partialEntries.size() || m_copyEntries.size();
}
}
#endif // USE(ACCELERATED_COMPOSITING)
|