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

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

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « cc/resources/recording_source.h ('k') | cc/resources/scoped_gpu_raster.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 "cc/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 MOCK_METHOD3(texParameteri, void(GLenum target, GLenum pname, GLint param)); 96 MOCK_METHOD3(texParameteri, void(GLenum target, GLenum pname, GLint param));
97 MOCK_METHOD1(waitSyncPoint, void(GLuint sync_point)); 97 MOCK_METHOD1(waitSyncPoint, void(GLuint sync_point));
98 MOCK_METHOD0(insertSyncPoint, GLuint(void)); 98 MOCK_METHOD0(insertSyncPoint, GLuint(void));
99 MOCK_METHOD2(produceTextureCHROMIUM, 99 MOCK_METHOD2(produceTextureCHROMIUM,
100 void(GLenum target, const GLbyte* mailbox)); 100 void(GLenum target, const GLbyte* mailbox));
101 MOCK_METHOD2(consumeTextureCHROMIUM, 101 MOCK_METHOD2(consumeTextureCHROMIUM,
102 void(GLenum target, const GLbyte* mailbox)); 102 void(GLenum target, const GLbyte* mailbox));
103 103
104 // Force all textures to be consecutive numbers starting at "1", 104 // Force all textures to be consecutive numbers starting at "1",
105 // so we easily can test for them. 105 // so we easily can test for them.
106 virtual GLuint NextTextureId() override { 106 GLuint NextTextureId() override {
107 base::AutoLock lock(namespace_->lock); 107 base::AutoLock lock(namespace_->lock);
108 return namespace_->next_texture_id++; 108 return namespace_->next_texture_id++;
109 } 109 }
110 virtual void RetireTextureId(GLuint) override {} 110 void RetireTextureId(GLuint) override {}
111 }; 111 };
112 112
113 // Shared data between multiple ResourceProviderContext. This contains mailbox 113 // Shared data between multiple ResourceProviderContext. This contains mailbox
114 // contents as well as information about sync points. 114 // contents as well as information about sync points.
115 class ContextSharedData { 115 class ContextSharedData {
116 public: 116 public:
117 static scoped_ptr<ContextSharedData> Create() { 117 static scoped_ptr<ContextSharedData> Create() {
118 return make_scoped_ptr(new ContextSharedData()); 118 return make_scoped_ptr(new ContextSharedData());
119 } 119 }
120 120
(...skipping 3518 matching lines...) Expand 10 before | Expand all | Expand 10 after
3639 resource_provider->AllocateForTesting(id); 3639 resource_provider->AllocateForTesting(id);
3640 Mock::VerifyAndClearExpectations(context); 3640 Mock::VerifyAndClearExpectations(context);
3641 3641
3642 DCHECK_EQ(10u, context->PeekTextureId()); 3642 DCHECK_EQ(10u, context->PeekTextureId());
3643 resource_provider->DeleteResource(id); 3643 resource_provider->DeleteResource(id);
3644 } 3644 }
3645 } 3645 }
3646 3646
3647 } // namespace 3647 } // namespace
3648 } // namespace cc 3648 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/recording_source.h ('k') | cc/resources/scoped_gpu_raster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698