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

Unified Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1814573002: Move flush id from WebGraphicsContext3DImpl to GLES2Implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lastflush: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/blink/webgraphicscontext3d_impl.h ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/blink/webgraphicscontext3d_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc
index 1be79eca1100f011b08faa88a86d66c4998d837e..d4e0a65b3de1cea1ad7fd21a06b2e95ddc413b3e 100644
--- a/gpu/blink/webgraphicscontext3d_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_impl.cc
@@ -42,18 +42,6 @@ using blink::WGC3Dsync;
namespace gpu_blink {
-namespace {
-
-uint32_t GenFlushID() {
- static base::subtle::Atomic32 flush_id = 0;
-
- base::subtle::Atomic32 my_id = base::subtle::Barrier_AtomicIncrement(
- &flush_id, 1);
- return static_cast<uint32_t>(my_id);
-}
-
-} // namespace anonymous
-
class WebGraphicsContext3DErrorMessageCallback
: public ::gpu::gles2::GLES2ImplementationErrorMessageCallback {
public:
@@ -198,9 +186,7 @@ WebGraphicsContext3DImpl::WebGraphicsContext3DImpl()
initialize_failed_(false),
context_lost_callback_(0),
error_message_callback_(0),
- gl_(NULL),
- flush_id_(0) {
-}
+ gl_(NULL) {}
WebGraphicsContext3DImpl::~WebGraphicsContext3DImpl() {
@@ -213,9 +199,7 @@ void WebGraphicsContext3DImpl::synthesizeGLError(WGC3Denum error) {
}
}
-uint32_t WebGraphicsContext3DImpl::lastFlushID() {
- return flush_id_;
-}
+DELEGATE_TO_GL_R(lastFlushID, GetLastFlushIdCHROMIUM, WebGLId)
DELEGATE_TO_GL_R(insertFenceSyncCHROMIUM, InsertFenceSyncCHROMIUM, WGC3Duint64)
@@ -354,15 +338,8 @@ DELEGATE_TO_GL_1(enable, Enable, WGC3Denum)
DELEGATE_TO_GL_1(enableVertexAttribArray, EnableVertexAttribArray,
WGC3Duint)
-void WebGraphicsContext3DImpl::finish() {
- flush_id_ = GenFlushID();
- gl_->Finish();
-}
-
-void WebGraphicsContext3DImpl::flush() {
- flush_id_ = GenFlushID();
- gl_->Flush();
-}
+DELEGATE_TO_GL(finish, Finish)
+DELEGATE_TO_GL(flush, Flush)
DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbuffer,
WGC3Denum, WGC3Denum, WGC3Denum, WebGLId)
« no previous file with comments | « gpu/blink/webgraphicscontext3d_impl.h ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698