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

Unified Diff: cc/debug/fake_web_graphics_context_3d.cc

Issue 50303007: Move test-only stuff from cc/debug/ to cc/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fold cc_test_utils into cc_test_support to fix windows link Created 7 years, 2 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 | « cc/debug/fake_web_graphics_context_3d.h ('k') | cc/debug/ordered_texture_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/fake_web_graphics_context_3d.cc
diff --git a/cc/debug/fake_web_graphics_context_3d.cc b/cc/debug/fake_web_graphics_context_3d.cc
deleted file mode 100644
index eab653b3602265267826cf3366a13323abdda23d..0000000000000000000000000000000000000000
--- a/cc/debug/fake_web_graphics_context_3d.cc
+++ /dev/null
@@ -1,373 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/debug/fake_web_graphics_context_3d.h"
-
-#include "base/logging.h"
-#include "third_party/khronos/GLES2/gl2.h"
-
-using WebKit::WGC3Dboolean;
-using WebKit::WGC3Denum;
-using WebKit::WGC3Dsizei;
-using WebKit::WebGLId;
-using WebKit::WebGraphicsContext3D;
-
-namespace cc {
-
-FakeWebGraphicsContext3D::FakeWebGraphicsContext3D()
- : WebKit::WebGraphicsContext3D() {
-}
-
-FakeWebGraphicsContext3D::~FakeWebGraphicsContext3D() {
-}
-
-bool FakeWebGraphicsContext3D::makeContextCurrent() {
- return true;
-}
-
-bool FakeWebGraphicsContext3D::isGLES2Compliant() {
- return false;
-}
-
-WebGLId FakeWebGraphicsContext3D::getPlatformTextureId() {
- return 0;
-}
-
-bool FakeWebGraphicsContext3D::isContextLost() {
- return false;
-}
-
-WGC3Denum FakeWebGraphicsContext3D::getGraphicsResetStatusARB() {
- return GL_NO_ERROR;
-}
-
-void* FakeWebGraphicsContext3D::mapBufferSubDataCHROMIUM(
- WGC3Denum target,
- WebKit::WGC3Dintptr offset,
- WebKit::WGC3Dsizeiptr size,
- WGC3Denum access) {
- return 0;
-}
-
-void* FakeWebGraphicsContext3D::mapTexSubImage2DCHROMIUM(
- WGC3Denum target,
- WebKit::WGC3Dint level,
- WebKit::WGC3Dint xoffset,
- WebKit::WGC3Dint yoffset,
- WebKit::WGC3Dsizei width,
- WebKit::WGC3Dsizei height,
- WGC3Denum format,
- WGC3Denum type,
- WGC3Denum access) {
- return 0;
-}
-
-WebKit::WebString FakeWebGraphicsContext3D::getRequestableExtensionsCHROMIUM() {
- return WebKit::WebString();
-}
-
-WGC3Denum FakeWebGraphicsContext3D::checkFramebufferStatus(
- WGC3Denum target) {
- return GL_FRAMEBUFFER_COMPLETE;
-}
-
-bool FakeWebGraphicsContext3D::getActiveAttrib(
- WebGLId program,
- WebKit::WGC3Duint index,
- ActiveInfo&) {
- return false;
-}
-
-bool FakeWebGraphicsContext3D::getActiveUniform(
- WebGLId program,
- WebKit::WGC3Duint index,
- ActiveInfo&) {
- return false;
-}
-
-WebKit::WGC3Dint FakeWebGraphicsContext3D::getAttribLocation(
- WebGLId program,
- const WebKit::WGC3Dchar* name) {
- return 0;
-}
-
-WebGraphicsContext3D::Attributes
- FakeWebGraphicsContext3D::getContextAttributes() {
- return WebGraphicsContext3D::Attributes();
-}
-
-WGC3Denum FakeWebGraphicsContext3D::getError() {
- return 0;
-}
-
-void FakeWebGraphicsContext3D::getIntegerv(
- WGC3Denum pname,
- WebKit::WGC3Dint* value) {
- if (pname == GL_MAX_TEXTURE_SIZE)
- *value = 1024;
- else if (pname == GL_ACTIVE_TEXTURE)
- *value = GL_TEXTURE0;
-}
-
-void FakeWebGraphicsContext3D::getProgramiv(
- WebGLId program,
- WGC3Denum pname,
- WebKit::WGC3Dint* value) {
- if (pname == GL_LINK_STATUS)
- *value = 1;
-}
-
-WebKit::WebString FakeWebGraphicsContext3D::getProgramInfoLog(
- WebGLId program) {
- return WebKit::WebString();
-}
-
-void FakeWebGraphicsContext3D::getShaderiv(
- WebGLId shader,
- WGC3Denum pname,
- WebKit::WGC3Dint* value) {
- if (pname == GL_COMPILE_STATUS)
- *value = 1;
-}
-
-WebKit::WebString FakeWebGraphicsContext3D::getShaderInfoLog(
- WebGLId shader) {
- return WebKit::WebString();
-}
-
-void FakeWebGraphicsContext3D::getShaderPrecisionFormat(
- WebKit::WGC3Denum shadertype,
- WebKit::WGC3Denum precisiontype,
- WebKit::WGC3Dint* range,
- WebKit::WGC3Dint* precision) {
- // Return the minimum precision requirements of the GLES specificatin.
- switch (precisiontype) {
- case GL_LOW_INT:
- range[0] = 8;
- range[1] = 8;
- *precision = 0;
- break;
- case GL_MEDIUM_INT:
- range[0] = 10;
- range[1] = 10;
- *precision = 0;
- break;
- case GL_HIGH_INT:
- range[0] = 16;
- range[1] = 16;
- *precision = 0;
- break;
- case GL_LOW_FLOAT:
- range[0] = 8;
- range[1] = 8;
- *precision = 8;
- break;
- case GL_MEDIUM_FLOAT:
- range[0] = 14;
- range[1] = 14;
- *precision = 10;
- break;
- case GL_HIGH_FLOAT:
- range[0] = 62;
- range[1] = 62;
- *precision = 16;
- break;
- default:
- NOTREACHED();
- break;
- }
-}
-
-WebKit::WebString FakeWebGraphicsContext3D::getShaderSource(
- WebGLId shader) {
- return WebKit::WebString();
-}
-
-WebKit::WebString FakeWebGraphicsContext3D::getString(WGC3Denum name) {
- return WebKit::WebString();
-}
-
-WebKit::WGC3Dint FakeWebGraphicsContext3D::getUniformLocation(
- WebGLId program,
- const WebKit::WGC3Dchar* name) {
- return 0;
-}
-
-WebKit::WGC3Dsizeiptr FakeWebGraphicsContext3D::getVertexAttribOffset(
- WebKit::WGC3Duint index,
- WGC3Denum pname) {
- return 0;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isBuffer(
- WebGLId buffer) {
- return false;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isEnabled(
- WGC3Denum cap) {
- return false;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isFramebuffer(
- WebGLId framebuffer) {
- return false;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isProgram(
- WebGLId program) {
- return false;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isRenderbuffer(
- WebGLId renderbuffer) {
- return false;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isShader(
- WebGLId shader) {
- return false;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isTexture(
- WebGLId texture) {
- return false;
-}
-
-void FakeWebGraphicsContext3D::genBuffers(WGC3Dsizei count, WebGLId* ids) {
- for (int i = 0; i < count; ++i)
- ids[i] = 1;
-}
-
-void FakeWebGraphicsContext3D::genFramebuffers(
- WGC3Dsizei count, WebGLId* ids) {
- for (int i = 0; i < count; ++i)
- ids[i] = 1;
-}
-
-void FakeWebGraphicsContext3D::genRenderbuffers(
- WGC3Dsizei count, WebGLId* ids) {
- for (int i = 0; i < count; ++i)
- ids[i] = 1;
-}
-
-void FakeWebGraphicsContext3D::genTextures(WGC3Dsizei count, WebGLId* ids) {
- for (int i = 0; i < count; ++i)
- ids[i] = 1;
-}
-
-void FakeWebGraphicsContext3D::deleteBuffers(WGC3Dsizei count, WebGLId* ids) {
-}
-
-void FakeWebGraphicsContext3D::deleteFramebuffers(
- WGC3Dsizei count, WebGLId* ids) {
-}
-
-void FakeWebGraphicsContext3D::deleteRenderbuffers(
- WGC3Dsizei count, WebGLId* ids) {
-}
-
-void FakeWebGraphicsContext3D::deleteTextures(WGC3Dsizei count, WebGLId* ids) {
-}
-
-WebGLId FakeWebGraphicsContext3D::createBuffer() {
- return 1;
-}
-
-WebGLId FakeWebGraphicsContext3D::createFramebuffer() {
- return 1;
-}
-
-WebGLId FakeWebGraphicsContext3D::createRenderbuffer() {
- return 1;
-}
-
-WebGLId FakeWebGraphicsContext3D::createTexture() {
- return 1;
-}
-
-void FakeWebGraphicsContext3D::deleteBuffer(WebKit::WebGLId id) {
-}
-
-void FakeWebGraphicsContext3D::deleteFramebuffer(WebKit::WebGLId id) {
-}
-
-void FakeWebGraphicsContext3D::deleteRenderbuffer(WebKit::WebGLId id) {
-}
-
-void FakeWebGraphicsContext3D::deleteTexture(WebGLId texture_id) {
-}
-
-WebGLId FakeWebGraphicsContext3D::createProgram() {
- return 1;
-}
-
-WebGLId FakeWebGraphicsContext3D::createShader(WGC3Denum) {
- return 1;
-}
-
-void FakeWebGraphicsContext3D::deleteProgram(WebKit::WebGLId id) {
-}
-
-void FakeWebGraphicsContext3D::deleteShader(WebKit::WebGLId id) {
-}
-
-void FakeWebGraphicsContext3D::attachShader(WebGLId program, WebGLId shader) {
-}
-
-void FakeWebGraphicsContext3D::useProgram(WebGLId program) {
-}
-
-void FakeWebGraphicsContext3D::bindBuffer(WGC3Denum target, WebGLId buffer) {
-}
-
-void FakeWebGraphicsContext3D::bindFramebuffer(
- WGC3Denum target, WebGLId framebuffer) {
-}
-
-void FakeWebGraphicsContext3D::bindRenderbuffer(
- WGC3Denum target, WebGLId renderbuffer) {
-}
-
-void FakeWebGraphicsContext3D::bindTexture(
- WGC3Denum target, WebGLId texture_id) {
-}
-
-WebGLId FakeWebGraphicsContext3D::createQueryEXT() {
- return 1;
-}
-
-WGC3Dboolean FakeWebGraphicsContext3D::isQueryEXT(WebGLId query) {
- return true;
-}
-
-void FakeWebGraphicsContext3D::endQueryEXT(WebKit::WGC3Denum target) {
-}
-
-void FakeWebGraphicsContext3D::getQueryObjectuivEXT(
- WebKit::WebGLId query,
- WebKit::WGC3Denum pname,
- WebKit::WGC3Duint* params) {
-}
-
-void FakeWebGraphicsContext3D::setContextLostCallback(
- WebGraphicsContextLostCallback* callback) {
-}
-
-void FakeWebGraphicsContext3D::loseContextCHROMIUM(WGC3Denum current,
- WGC3Denum other) {
-}
-
-WebKit::WGC3Duint FakeWebGraphicsContext3D::createImageCHROMIUM(
- WebKit::WGC3Dsizei width, WebKit::WGC3Dsizei height,
- WebKit::WGC3Denum internalformat) {
- return 0;
-}
-
-void* FakeWebGraphicsContext3D::mapImageCHROMIUM(WebKit::WGC3Duint image_id,
- WebKit::WGC3Denum access) {
- return 0;
-}
-
-} // namespace cc
« no previous file with comments | « cc/debug/fake_web_graphics_context_3d.h ('k') | cc/debug/ordered_texture_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698