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

Side by Side Diff: cc/test/fake_web_graphics_context_3d.cc

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/test/fake_web_graphics_context_3d.h" 5 #include "cc/test/fake_web_graphics_context_3d.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "gpu/GLES2/gl2extchromium.h" 11 #include "gpu/GLES2/gl2extchromium.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/khronos/GLES2/gl2ext.h" 13 #include "third_party/khronos/GLES2/gl2ext.h"
14 14
15 using WebKit::WGC3Dboolean; 15 using WebKit::WGC3Dboolean;
16 using WebKit::WGC3Dchar;
16 using WebKit::WGC3Denum; 17 using WebKit::WGC3Denum;
18 using WebKit::WGC3Duint;
17 using WebKit::WebGLId; 19 using WebKit::WebGLId;
18 using WebKit::WebGraphicsContext3D; 20 using WebKit::WebGraphicsContext3D;
21 using WebKit::WebString;
19 22
20 namespace cc { 23 namespace cc {
21 24
22 static const WebGLId kBufferId = 1; 25 static const WebGLId kBufferId = 1;
23 static const WebGLId kFramebufferId = 2; 26 static const WebGLId kFramebufferId = 2;
24 static const WebGLId kProgramId = 3; 27 static const WebGLId kProgramId = 3;
25 static const WebGLId kRenderbufferId = 4; 28 static const WebGLId kRenderbufferId = 4;
26 static const WebGLId kShaderId = 5; 29 static const WebGLId kShaderId = 5;
27 30
28 static unsigned s_context_id = 1; 31 static unsigned s_context_id = 1;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 418 }
416 419
417 WebKit::WebGLId FakeWebGraphicsContext3D::NextTextureId() { 420 WebKit::WebGLId FakeWebGraphicsContext3D::NextTextureId() {
418 WebGLId texture_id = next_texture_id_++; 421 WebGLId texture_id = next_texture_id_++;
419 DCHECK(texture_id < (1 << 16)); 422 DCHECK(texture_id < (1 << 16));
420 texture_id |= context_id_ << 16; 423 texture_id |= context_id_ << 16;
421 return texture_id; 424 return texture_id;
422 } 425 }
423 426
424 } // namespace cc 427 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698