| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "remoting/client/ios/display/gl_demo_screen.h" | 5 #include "remoting/client/ios/display/gl_demo_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "remoting/client/display/canvas.h" | 8 #include "remoting/client/display/canvas.h" |
| 9 #include "remoting/client/display/gl_math.h" | 9 #include "remoting/client/display/gl_math.h" |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Send geometry to vertex shader. | 97 // Send geometry to vertex shader. |
| 98 GLuint aPosition = glGetAttribLocation(program_, a_position); | 98 GLuint aPosition = glGetAttribLocation(program_, a_position); |
| 99 | 99 |
| 100 glVertexAttribPointer(aPosition, 2, GL_FLOAT, GL_FALSE, 0, square); | 100 glVertexAttribPointer(aPosition, 2, GL_FLOAT, GL_FALSE, 0, square); |
| 101 glEnableVertexAttribArray(aPosition); | 101 glEnableVertexAttribArray(aPosition); |
| 102 | 102 |
| 103 // Draw. | 103 // Draw. |
| 104 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); | 104 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 return true; | 107 return false; |
| 108 } | 108 } |
| 109 | 109 |
| 110 base::WeakPtr<Drawable> GlDemoScreen::GetWeakPtr() { | 110 base::WeakPtr<Drawable> GlDemoScreen::GetWeakPtr() { |
| 111 DCHECK(thread_checker_.CalledOnValidThread()); | 111 DCHECK(thread_checker_.CalledOnValidThread()); |
| 112 return weak_factory_.GetWeakPtr(); | 112 return weak_factory_.GetWeakPtr(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace remoting | 115 } // namespace remoting |
| OLD | NEW |