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

Side by Side Diff: remoting/client/ios/display/gl_demo_screen.mm

Issue 2828113002: Provide HostView with data required for creating a new and session, and render for CRD iOS. (Closed)
Patch Set: fixing issue based on feedback. Created 3 years, 7 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698