| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/texture_copier.h" | 7 #include "cc/texture_copier.h" |
| 8 | 8 |
| 9 #include "cc/test/fake_web_graphics_context_3d.h" | 9 #include "cc/test/fake_web_graphics_context_3d.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Linear filtering should be restored. | 44 // Linear filtering should be restored. |
| 45 EXPECT_CALL(*mockContext, texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FI
LTER, GL_LINEAR)); | 45 EXPECT_CALL(*mockContext, texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FI
LTER, GL_LINEAR)); |
| 46 EXPECT_CALL(*mockContext, texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FI
LTER, GL_LINEAR)); | 46 EXPECT_CALL(*mockContext, texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FI
LTER, GL_LINEAR)); |
| 47 | 47 |
| 48 // Default framebuffer should be restored | 48 // Default framebuffer should be restored |
| 49 EXPECT_CALL(*mockContext, bindFramebuffer(GL_FRAMEBUFFER, 0)); | 49 EXPECT_CALL(*mockContext, bindFramebuffer(GL_FRAMEBUFFER, 0)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 int sourceTextureId = 1; | 52 int sourceTextureId = 1; |
| 53 int destTextureId = 2; | 53 int destTextureId = 2; |
| 54 IntSize size(256, 128); | 54 gfx::Size size(256, 128); |
| 55 scoped_ptr<AcceleratedTextureCopier> copier(AcceleratedTextureCopier::create
(mockContext.get(), false)); | 55 scoped_ptr<AcceleratedTextureCopier> copier(AcceleratedTextureCopier::create
(mockContext.get(), false)); |
| 56 TextureCopier::Parameters copy = { sourceTextureId, destTextureId, size }; | 56 TextureCopier::Parameters copy = { sourceTextureId, destTextureId, size }; |
| 57 copier->copyTexture(copy); | 57 copier->copyTexture(copy); |
| 58 } | 58 } |
| OLD | NEW |