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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 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/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_utils.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 638245b7f6edcbad9ee578c51d3fe201ded392e9..c16a962f6d59ba61df57af19e1a78b3573ea57f8 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -846,6 +846,20 @@ size_t GLES2Util::CalcClearBufferfvDataCount(int buffer) {
}
}
+// static
+void GLES2Util::MapUint64ToTwoUint32(
+ uint64_t v64, uint32_t* v32_0, uint32_t* v32_1) {
+ DCHECK(v32_0 && v32_1);
+ *v32_0 = static_cast<uint32_t>(v64 & 0xFFFFFFFF);
+ *v32_1 = static_cast<uint32_t>((v64 & 0xFFFFFFFF00000000) >> 32);
+}
+
+// static
+uint64_t GLES2Util::MapTwoUint32ToUint64(uint32_t v32_0, uint32_t v32_1) {
+ uint64_t v64 = v32_1;
+ return (v64 << 32) | v32_0;
+}
+
namespace {
// WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698