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

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

Issue 619453002: gpu: Remove Echo and SwapCompletion GL interfacess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tits
Patch Set: rebase Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test_gles2_interface.h" 5 #include "cc/test/test_gles2_interface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/test/test_web_graphics_context_3d.h" 8 #include "cc/test/test_web_graphics_context_3d.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 TestGLES2Interface::TestGLES2Interface(TestWebGraphicsContext3D* test_context) 12 TestGLES2Interface::TestGLES2Interface(TestWebGraphicsContext3D* test_context)
13 : test_context_(test_context) { 13 : test_context_(test_context), last_swap_type_(NO_SWAP) {
14 DCHECK(test_context_); 14 DCHECK(test_context_);
15 } 15 }
16 16
17 TestGLES2Interface::~TestGLES2Interface() {} 17 TestGLES2Interface::~TestGLES2Interface() {}
18 18
19 void TestGLES2Interface::GenTextures(GLsizei n, GLuint* textures) { 19 void TestGLES2Interface::GenTextures(GLsizei n, GLuint* textures) {
20 for (GLsizei i = 0; i < n; ++i) { 20 for (GLsizei i = 0; i < n; ++i) {
21 textures[i] = test_context_->createTexture(); 21 textures[i] = test_context_->createTexture();
22 } 22 }
23 } 23 }
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 void TestGLES2Interface::ResizeCHROMIUM(GLuint width, 413 void TestGLES2Interface::ResizeCHROMIUM(GLuint width,
414 GLuint height, 414 GLuint height,
415 float device_scale) { 415 float device_scale) {
416 test_context_->reshapeWithScaleFactor(width, height, device_scale); 416 test_context_->reshapeWithScaleFactor(width, height, device_scale);
417 } 417 }
418 418
419 void TestGLES2Interface::LoseContextCHROMIUM(GLenum current, GLenum other) { 419 void TestGLES2Interface::LoseContextCHROMIUM(GLenum current, GLenum other) {
420 test_context_->loseContextCHROMIUM(current, other); 420 test_context_->loseContextCHROMIUM(current, other);
421 } 421 }
422 422
423 void TestGLES2Interface::SwapBuffers() {
424 last_swap_type_ = SWAP;
425 }
426
427 void TestGLES2Interface::PostSubBufferCHROMIUM(GLint x,
428 GLint y,
429 GLint width,
430 GLint height) {
431 last_swap_type_ = PARTIAL_SWAP;
432 last_partial_swap_rect_ = gfx::Rect(x, y, width, height);
433 }
434
423 } // namespace cc 435 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698