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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 13 matching lines...) Expand all
24 #include "gpu/config/gpu_switches.h" 24 #include "gpu/config/gpu_switches.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 #include "ui/gl/gl_implementation.h" 26 #include "ui/gl/gl_implementation.h"
27 #include "ui/gl/gl_mock.h" 27 #include "ui/gl/gl_mock.h"
28 #include "ui/gl/gl_surface_stub.h" 28 #include "ui/gl/gl_surface_stub.h"
29 29
30 #if !defined(GL_DEPTH24_STENCIL8) 30 #if !defined(GL_DEPTH24_STENCIL8)
31 #define GL_DEPTH24_STENCIL8 0x88F0 31 #define GL_DEPTH24_STENCIL8 0x88F0
32 #endif 32 #endif
33 33
34 using ::gfx::MockGLInterface; 34 using ::gl::MockGLInterface;
35 using ::testing::_; 35 using ::testing::_;
36 using ::testing::DoAll; 36 using ::testing::DoAll;
37 using ::testing::InSequence; 37 using ::testing::InSequence;
38 using ::testing::Invoke; 38 using ::testing::Invoke;
39 using ::testing::MatcherCast; 39 using ::testing::MatcherCast;
40 using ::testing::Mock; 40 using ::testing::Mock;
41 using ::testing::Pointee; 41 using ::testing::Pointee;
42 using ::testing::Return; 42 using ::testing::Return;
43 using ::testing::SaveArg; 43 using ::testing::SaveArg;
44 using ::testing::SetArrayArgument; 44 using ::testing::SetArrayArgument;
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 EXPECT_CALL(*gl_, GetAttachedShaders(_, _, _, _)).Times(0); 601 EXPECT_CALL(*gl_, GetAttachedShaders(_, _, _, _)).Times(0);
602 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); 602 EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
603 cmd.Init(client_program_id_, 603 cmd.Init(client_program_id_,
604 shared_memory_id_, 604 shared_memory_id_,
605 kInvalidSharedMemoryOffset, 605 kInvalidSharedMemoryOffset,
606 Result::ComputeSize(1)); 606 Result::ComputeSize(1));
607 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); 607 EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
608 } 608 }
609 609
610 TEST_P(GLES2DecoderWithShaderTest, GetShaderPrecisionFormatSucceeds) { 610 TEST_P(GLES2DecoderWithShaderTest, GetShaderPrecisionFormatSucceeds) {
611 ScopedGLImplementationSetter gl_impl(::gfx::kGLImplementationEGLGLES2); 611 ScopedGLImplementationSetter gl_impl(::gl::kGLImplementationEGLGLES2);
612 GetShaderPrecisionFormat cmd; 612 GetShaderPrecisionFormat cmd;
613 typedef GetShaderPrecisionFormat::Result Result; 613 typedef GetShaderPrecisionFormat::Result Result;
614 Result* result = static_cast<Result*>(shared_memory_address_); 614 Result* result = static_cast<Result*>(shared_memory_address_);
615 result->success = 0; 615 result->success = 0;
616 const GLint range[2] = {62, 62}; 616 const GLint range[2] = {62, 62};
617 const GLint precision = 16; 617 const GLint precision = 16;
618 EXPECT_CALL(*gl_, GetShaderPrecisionFormat(_, _, _, _)) 618 EXPECT_CALL(*gl_, GetShaderPrecisionFormat(_, _, _, _))
619 .WillOnce(DoAll(SetArrayArgument<2>(range, range + 2), 619 .WillOnce(DoAll(SetArrayArgument<2>(range, range + 2),
620 SetArgPointee<3>(precision))) 620 SetArgPointee<3>(precision)))
621 .RetiresOnSaturation(); 621 .RetiresOnSaturation();
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 } 2315 }
2316 2316
2317 // TODO(gman): DeleteProgram 2317 // TODO(gman): DeleteProgram
2318 2318
2319 // TODO(gman): UseProgram 2319 // TODO(gman): UseProgram
2320 2320
2321 // TODO(gman): DeleteShader 2321 // TODO(gman): DeleteShader
2322 2322
2323 } // namespace gles2 2323 } // namespace gles2
2324 } // namespace gpu 2324 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698