OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2chromium.h> | 6 #include <GLES2/gl2chromium.h> |
7 #include <GLES2/gl2ext.h> | 7 #include <GLES2/gl2ext.h> |
8 #include <GLES2/gl2extchromium.h> | 8 #include <GLES2/gl2extchromium.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 static const int kImageWidth = 256; | 35 static const int kImageWidth = 256; |
36 static const int kImageHeight = 256; | 36 static const int kImageHeight = 256; |
37 static const int kImageBytesPerPixel = 4; | 37 static const int kImageBytesPerPixel = 4; |
38 | 38 |
39 class MockGpuMemoryBufferTest : public testing::Test { | 39 class MockGpuMemoryBufferTest : public testing::Test { |
40 protected: | 40 protected: |
41 virtual void SetUp() { | 41 virtual void SetUp() { |
42 GLManager::Options options; | 42 GLManager::Options options; |
43 image_manager_ = new ImageManager; | 43 image_manager_ = new ImageManager; |
44 image_factory_.reset( | 44 image_factory_.reset( |
45 new StrictMock<ImageFactoryMock>(image_manager_)); | 45 new StrictMock<ImageFactoryMock>(image_manager_.get())); |
46 options.image_manager = image_manager_.get(); | 46 options.image_manager = image_manager_.get(); |
47 options.image_factory = image_factory_.get(); | 47 options.image_factory = image_factory_.get(); |
48 | 48 |
49 gl_.Initialize(options); | 49 gl_.Initialize(options); |
50 gl_.MakeCurrent(); | 50 gl_.MakeCurrent(); |
51 } | 51 } |
52 | 52 |
53 virtual void TearDown() { | 53 virtual void TearDown() { |
54 gl_.Destroy(); | 54 gl_.Destroy(); |
55 } | 55 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 .RetiresOnSaturation(); | 132 .RetiresOnSaturation(); |
133 | 133 |
134 glDestroyImageCHROMIUM(image_id); | 134 glDestroyImageCHROMIUM(image_id); |
135 | 135 |
136 // Delete the texture. | 136 // Delete the texture. |
137 glDeleteTextures(1, &texture_id); | 137 glDeleteTextures(1, &texture_id); |
138 } | 138 } |
139 | 139 |
140 } // namespace gles2 | 140 } // namespace gles2 |
141 } // namespace gpu | 141 } // namespace gpu |
OLD | NEW |