Home | History | Annotate | Download | only in service

Lines Matching refs:Texture

47   Texture* CreateTexture() {
48 return new Texture(1);
51 void SetTarget(Texture* texture, GLenum target, GLuint max_level) {
52 texture->SetTarget(NULL, target, max_level);
56 Texture* texture,
67 texture->SetLevelInfo(NULL,
80 GLenum SetParameter(Texture* texture, GLenum pname, GLint param) {
81 return texture->SetParameteri(feature_info_, pname, param);
84 void DestroyTexture(Texture* texture) {
85 delete texture;
99 Texture* texture = CreateTexture();
102 manager_->ProduceTexture(0, name, texture);
103 EXPECT_EQ(texture, manager_->ConsumeTexture(0, name));
106 EXPECT_EQ(texture, manager_->ConsumeTexture(0, name));
112 DestroyTexture(texture);
116 // Tests behavior with multiple produce on the same texture.
118 Texture* texture = CreateTexture();
122 manager_->ProduceTexture(0, name1, texture);
123 EXPECT_EQ(texture, manager_->ConsumeTexture(0, name1));
126 manager_->ProduceTexture(0, name1, texture);
127 EXPECT_EQ(texture, manager_->ConsumeTexture(0, name1));
131 manager_->ProduceTexture(0, name2, texture);
134 EXPECT_EQ(texture, manager_->ConsumeTexture(0, name1));
135 EXPECT_EQ(texture, manager_->ConsumeTexture(0, name2));
138 DestroyTexture(texture);
146 Texture* texture1 = CreateTexture();
147 Texture* texture2 = CreateTexture();
154 // Can produce a second time with the same mailbox, but different texture.
158 // Destroying the texture that's under no mailbox shouldn't have an effect.
162 // Destroying the texture that's bound should clean up.
168 Texture* texture1 = CreateTexture();
169 Texture* texture2 = CreateTexture();
211 Texture* DefineTexture() {
212 Texture* texture = CreateTexture();
215 SetTarget(texture, GL_TEXTURE_2D, levels_needed);
216 SetLevelInfo(texture,
227 SetParameter(texture, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
228 SetParameter(texture, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
229 return texture;
281 Texture* texture = DefineTexture();
285 manager_->ProduceTexture(GL_TEXTURE_2D, name, texture);
286 EXPECT_EQ(texture, manager_->ConsumeTexture(GL_TEXTURE_2D, name));
288 DestroyTexture(texture);
296 Texture* texture = DefineTexture();
299 manager_->ProduceTexture(GL_TEXTURE_2D, name, texture);
300 EXPECT_EQ(texture, manager_->ConsumeTexture(GL_TEXTURE_2D, name));
306 DestroyTexture(texture);
311 // Duplicates a texture into a second manager instance, and then
317 Texture* texture = DefineTexture();
320 manager_->ProduceTexture(GL_TEXTURE_2D, name, texture);
321 EXPECT_EQ(texture, manager_->ConsumeTexture(GL_TEXTURE_2D, name));
331 Texture* new_texture = manager2_->ConsumeTexture(GL_TEXTURE_2D, name);
333 EXPECT_NE(texture, new_texture);
336 // Resize original texture
337 SetLevelInfo(texture,
349 EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL);
362 EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) != NULL);
363 // Resize original texture again....
364 SetLevelInfo(texture,
375 // ...and immediately delete the texture which should save the changes.
378 DestroyTexture(texture);
383 // The last change to the texture should be visible without a sync point (i.e.
397 // texture definition with an older version.
402 Texture* texture1 = DefineTexture();
404 Texture* texture2 = DefineTexture();
406 Texture* new_texture1 = NULL;
407 Texture* new_texture2 = NULL;
468 // TODO: different texture into same mailbox
470 // TODO: same texture, multiple mailboxes
472 // TODO: Produce incomplete texture
474 // TODO: Texture::level_infos_[][].size()