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

Side by Side Diff: cc/texture_layer.cc

Issue 11270047: cc: Rename TextureUpdate to ResourceUpdate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort includes and forward declarations. Created 8 years, 1 month 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/texture_layer.h ('k') | cc/texture_layer_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "cc/texture_layer.h" 7 #include "cc/texture_layer.h"
8 8
9 #include "third_party/khronos/GLES2/gl2.h" 9 #include "third_party/khronos/GLES2/gl2.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (m_textureId && layerTreeHost() && host != layerTreeHost()) 100 if (m_textureId && layerTreeHost() && host != layerTreeHost())
101 layerTreeHost()->acquireLayerTextures(); 101 layerTreeHost()->acquireLayerTextures();
102 Layer::setLayerTreeHost(host); 102 Layer::setLayerTreeHost(host);
103 } 103 }
104 104
105 bool TextureLayer::drawsContent() const 105 bool TextureLayer::drawsContent() const
106 { 106 {
107 return (m_client || m_textureId) && !m_contextLost && Layer::drawsContent(); 107 return (m_client || m_textureId) && !m_contextLost && Layer::drawsContent();
108 } 108 }
109 109
110 void TextureLayer::update(TextureUpdateQueue& queue, const OcclusionTracker*, Re nderingStats&) 110 void TextureLayer::update(ResourceUpdateQueue& queue, const OcclusionTracker*, R enderingStats&)
111 { 111 {
112 if (m_client) { 112 if (m_client) {
113 m_textureId = m_client->prepareTexture(queue); 113 m_textureId = m_client->prepareTexture(queue);
114 m_contextLost = m_client->context()->getGraphicsResetStatusARB() != GL_N O_ERROR; 114 m_contextLost = m_client->context()->getGraphicsResetStatusARB() != GL_N O_ERROR;
115 } 115 }
116 116
117 m_needsDisplay = false; 117 m_needsDisplay = false;
118 } 118 }
119 119
120 void TextureLayer::pushPropertiesTo(LayerImpl* layer) 120 void TextureLayer::pushPropertiesTo(LayerImpl* layer)
121 { 121 {
122 Layer::pushPropertiesTo(layer); 122 Layer::pushPropertiesTo(layer);
123 123
124 TextureLayerImpl* textureLayer = static_cast<TextureLayerImpl*>(layer); 124 TextureLayerImpl* textureLayer = static_cast<TextureLayerImpl*>(layer);
125 textureLayer->setFlipped(m_flipped); 125 textureLayer->setFlipped(m_flipped);
126 textureLayer->setUVRect(m_uvRect); 126 textureLayer->setUVRect(m_uvRect);
127 textureLayer->setPremultipliedAlpha(m_premultipliedAlpha); 127 textureLayer->setPremultipliedAlpha(m_premultipliedAlpha);
128 textureLayer->setTextureId(m_textureId); 128 textureLayer->setTextureId(m_textureId);
129 } 129 }
130 130
131 } 131 }
OLDNEW
« no previous file with comments | « cc/texture_layer.h ('k') | cc/texture_layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698