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

Side by Side Diff: cc/throttled_texture_uploader_unittest.cc

Issue 11150025: Patch from https://codereview.chromium.org/11111005/ without actual file deletes (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/throttled_texture_uploader.cc ('k') | cc/tile_draw_quad.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 2012 The Chromium Authors. All rights reserved. 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 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 "ThrottledTextureUploader.h" 7 #include "ThrottledTextureUploader.h"
8 8
9 #include "CCPrioritizedTexture.h" 9 #include "CCPrioritizedTexture.h"
10 #include "Extensions3DChromium.h"
11 #include "FakeWebGraphicsContext3D.h" 10 #include "FakeWebGraphicsContext3D.h"
12 #include "GraphicsContext3D.h" 11 #include "third_party/khronos/GLES2/gl2ext.h"
13 12 #include "third_party/khronos/GLES2/gl2.h"
14 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "FakeWebGraphicsContext3D.h"
16 #include <wtf/RefPtr.h> 16 #include <wtf/RefPtr.h>
17 17
18 using namespace cc; 18 using namespace cc;
19 using namespace WebKit; 19 using namespace WebKit;
20 20
21 namespace { 21 namespace {
22 22
23 class FakeWebGraphicsContext3DWithQueryTesting : public FakeWebGraphicsContext3D { 23 class FakeWebGraphicsContext3DWithQueryTesting : public FakeWebGraphicsContext3D {
24 public: 24 public:
25 FakeWebGraphicsContext3DWithQueryTesting() : m_resultAvailable(0) 25 FakeWebGraphicsContext3DWithQueryTesting() : m_resultAvailable(0)
26 { 26 {
27 } 27 }
28 28
29 virtual void getQueryObjectuivEXT(WebGLId, GC3Denum type, GC3Duint* value) 29 virtual void getQueryObjectuivEXT(WebGLId, WGC3Denum type, WGC3Duint* value)
30 { 30 {
31 switch (type) { 31 switch (type) {
32 case Extensions3DChromium::QUERY_RESULT_AVAILABLE_EXT: 32 case GL_QUERY_RESULT_AVAILABLE_EXT:
33 *value = m_resultAvailable; 33 *value = m_resultAvailable;
34 break; 34 break;
35 default: 35 default:
36 *value = 0; 36 *value = 0;
37 break; 37 break;
38 } 38 }
39 } 39 }
40 40
41 void setResultAvailable(unsigned resultAvailable) { m_resultAvailable = resu ltAvailable; } 41 void setResultAvailable(unsigned resultAvailable) { m_resultAvailable = resu ltAvailable; }
42 42
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 EXPECT_EQ(1, uploader->numBlockingUploads()); 101 EXPECT_EQ(1, uploader->numBlockingUploads());
102 102
103 fakeContext->setResultAvailable(1); 103 fakeContext->setResultAvailable(1);
104 EXPECT_EQ(0, uploader->numBlockingUploads()); 104 EXPECT_EQ(0, uploader->numBlockingUploads());
105 uploader->uploadTexture(NULL, upload); 105 uploader->uploadTexture(NULL, upload);
106 uploader->markPendingUploadsAsNonBlocking(); 106 uploader->markPendingUploadsAsNonBlocking();
107 EXPECT_EQ(0, uploader->numBlockingUploads()); 107 EXPECT_EQ(0, uploader->numBlockingUploads());
108 } 108 }
109 109
110 } // namespace 110 } // namespace
OLDNEW
« no previous file with comments | « cc/throttled_texture_uploader.cc ('k') | cc/tile_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698