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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h

Issue 1808403002: Move simple methods [F-S] from WebGraphicsContext3D to GLES2Interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindFoo
Patch Set: simples-fplus: tests Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef WebGLTimerQueryEXT_h 5 #ifndef WebGLTimerQueryEXT_h
6 #define WebGLTimerQueryEXT_h 6 #define WebGLTimerQueryEXT_h
7 7
8 #include "modules/webgl/WebGLContextObject.h" 8 #include "modules/webgl/WebGLContextObject.h"
9 9
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
11 11
12 namespace gpu {
13 namespace gles2 {
14 class GLES2Interface;
15 }
16 }
17
12 namespace blink { 18 namespace blink {
13 19
14 class WebGLTimerQueryEXT : public WebGLContextObject, public WebThread::TaskObse rver { 20 class WebGLTimerQueryEXT : public WebGLContextObject, public WebThread::TaskObse rver {
15 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
16 22
17 public: 23 public:
18 static WebGLTimerQueryEXT* create(WebGLRenderingContextBase*); 24 static WebGLTimerQueryEXT* create(WebGLRenderingContextBase*);
19 ~WebGLTimerQueryEXT() override; 25 ~WebGLTimerQueryEXT() override;
20 26
21 void setTarget(GLenum target) { m_target = target; } 27 void setTarget(GLenum target) { m_target = target; }
22 28
23 GLuint object() const { return m_queryId; } 29 GLuint object() const { return m_queryId; }
24 bool hasTarget() const { return m_target != 0; } 30 bool hasTarget() const { return m_target != 0; }
25 GLenum target() const { return m_target; } 31 GLenum target() const { return m_target; }
26 32
27 void resetCachedResult(); 33 void resetCachedResult();
28 void updateCachedResult(WebGraphicsContext3D*); 34 void updateCachedResult(gpu::gles2::GLES2Interface*);
29 35
30 bool isQueryResultAvailable(); 36 bool isQueryResultAvailable();
31 GLuint64 getQueryResult(); 37 GLuint64 getQueryResult();
32 38
33 protected: 39 protected:
34 WebGLTimerQueryEXT(WebGLRenderingContextBase*); 40 WebGLTimerQueryEXT(WebGLRenderingContextBase*);
35 41
36 private: 42 private:
37 bool hasObject() const override { return m_queryId != 0; } 43 bool hasObject() const override { return m_queryId != 0; }
38 void deleteObjectImpl(WebGraphicsContext3D*) override; 44 void deleteObjectImpl(WebGraphicsContext3D*) override;
(...skipping 10 matching lines...) Expand all
49 55
50 bool m_taskObserverRegistered; 56 bool m_taskObserverRegistered;
51 bool m_canUpdateAvailability; 57 bool m_canUpdateAvailability;
52 bool m_queryResultAvailable; 58 bool m_queryResultAvailable;
53 GLuint64 m_queryResult; 59 GLuint64 m_queryResult;
54 }; 60 };
55 61
56 } // namespace blink 62 } // namespace blink
57 63
58 #endif // WebGLTimerQueryEXT_h 64 #endif // WebGLTimerQueryEXT_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698