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

Side by Side Diff: cc/resources/video_resource_updater_unittest.cc

Issue 2687143003: Fix flaky LayerTreeHostCopyRequestTestDeleteTexture test. (Closed)
Patch Set: flaky-copyrequest: . Created 3 years, 10 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
« no previous file with comments | « no previous file | cc/test/test_gles2_interface.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 GLuint createTexture() override { 48 GLuint createTexture() override {
49 ++created_texture_count_; 49 ++created_texture_count_;
50 return TestWebGraphicsContext3D::createTexture(); 50 return TestWebGraphicsContext3D::createTexture();
51 } 51 }
52 52
53 void deleteTexture(GLuint texture) override { 53 void deleteTexture(GLuint texture) override {
54 --created_texture_count_; 54 --created_texture_count_;
55 TestWebGraphicsContext3D::deleteTexture(texture); 55 TestWebGraphicsContext3D::deleteTexture(texture);
56 } 56 }
57 57
58 void deleteTextures(GLsizei count, const GLuint* ids) override {
59 created_texture_count_ -= count;
60 TestWebGraphicsContext3D::deleteTextures(count, ids);
61 }
62
58 int UploadCount() { return upload_count_; } 63 int UploadCount() { return upload_count_; }
59 void ResetUploadCount() { upload_count_ = 0; } 64 void ResetUploadCount() { upload_count_ = 0; }
60 65
61 int TextureCreationCount() { return created_texture_count_; } 66 int TextureCreationCount() { return created_texture_count_; }
62 void ResetTextureCreationCount() { created_texture_count_ = 0; } 67 void ResetTextureCreationCount() { created_texture_count_ = 0; }
63 68
64 bool WasImmutableTextureCreated() { return immutable_texture_created_; } 69 bool WasImmutableTextureCreated() { return immutable_texture_created_; }
65 void ResetImmutableTextureCreated() { immutable_texture_created_ = false; } 70 void ResetImmutableTextureCreated() { immutable_texture_created_ = false; }
66 71
67 private: 72 private:
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 FromHalfFloat(half_floats[i] + 1) - FromHalfFloat(half_floats[i]); 571 FromHalfFloat(half_floats[i] + 1) - FromHalfFloat(half_floats[i]);
567 EXPECT_NEAR(FromHalfFloat(half_floats[i]), expected_value, 572 EXPECT_NEAR(FromHalfFloat(half_floats[i]), expected_value,
568 expected_precision) 573 expected_precision)
569 << "i = " << i << " bits = " << bits; 574 << "i = " << i << " bits = " << bits;
570 } 575 }
571 } 576 }
572 } 577 }
573 578
574 } // namespace 579 } // namespace
575 } // namespace cc 580 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/test_gles2_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698