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

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

Issue 2886453004: Adding ThreadChecker validation to d'tors for client classes (Closed)
Patch Set: 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
« no previous file with comments | « remoting/client/software_video_renderer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ios/display/gl_demo_screen.h" 5 #include "remoting/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 17 matching lines...) Expand all
28 "}"; 28 "}";
29 29
30 const GLchar* a_position = "a_position"; 30 const GLchar* a_position = "a_position";
31 31
32 } // namespace 32 } // namespace
33 33
34 // This is a demo screen that can be added to the renderer to test the drawable 34 // This is a demo screen that can be added to the renderer to test the drawable
35 // integration. This will draw an expanding checkerboard pattern to the screen. 35 // integration. This will draw an expanding checkerboard pattern to the screen.
36 GlDemoScreen::GlDemoScreen() : weak_factory_(this) {} 36 GlDemoScreen::GlDemoScreen() : weak_factory_(this) {}
37 37
38 GlDemoScreen::~GlDemoScreen() {} 38 GlDemoScreen::~GlDemoScreen() {
39 DCHECK(thread_checker_.CalledOnValidThread());
40 }
39 41
40 void GlDemoScreen::SetCanvas(base::WeakPtr<Canvas> canvas) { 42 void GlDemoScreen::SetCanvas(base::WeakPtr<Canvas> canvas) {
41 canvas_ = canvas; 43 canvas_ = canvas;
42 44
43 // Create and compile vertex shader. 45 // Create and compile vertex shader.
44 GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); 46 GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER);
45 glShaderSource(vertexShader, 1, &vertexShaderSource, NULL); 47 glShaderSource(vertexShader, 1, &vertexShaderSource, NULL);
46 glCompileShader(vertexShader); 48 glCompileShader(vertexShader);
47 49
48 // Create and compile fragment shader. 50 // Create and compile fragment shader.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 108 }
107 return false; 109 return false;
108 } 110 }
109 111
110 base::WeakPtr<Drawable> GlDemoScreen::GetWeakPtr() { 112 base::WeakPtr<Drawable> GlDemoScreen::GetWeakPtr() {
111 DCHECK(thread_checker_.CalledOnValidThread()); 113 DCHECK(thread_checker_.CalledOnValidThread());
112 return weak_factory_.GetWeakPtr(); 114 return weak_factory_.GetWeakPtr();
113 } 115 }
114 116
115 } // namespace remoting 117 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/software_video_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698