summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 11:13:07 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 11:13:07 +0000
commit5dfc457b046705366bc8e58f5006b4e27c58f5c6 (patch)
treec7571ceaf0c4dc7ebc32b978b89950630ad540b7 /cc
parentdf4c9c7f61a4de12ccc7e8020bcca9dcb5454192 (diff)
downloadchromium_src-5dfc457b046705366bc8e58f5006b4e27c58f5c6.zip
chromium_src-5dfc457b046705366bc8e58f5006b4e27c58f5c6.tar.gz
chromium_src-5dfc457b046705366bc8e58f5006b4e27c58f5c6.tar.bz2
Add GL entry points for DiscardBackbufferCHROMIUM
This adds and uses a GL command buffer command for DiscardBackbufferCHROMIUM instead of having a WebGraphicsContext3D entry point + common/ IPC message. This is used to deallocate, if possible, the backbuffer when no longer in use. BUG=181120 Review URL: https://codereview.chromium.org/104823005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240583 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/output/gl_renderer_unittest.cc4
-rw-r--r--cc/output/output_surface.cc3
2 files changed, 2 insertions, 5 deletions
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index e8e0ae8..b146443 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -760,9 +760,6 @@ class VisibilityChangeIsLastCallTrackingContext
virtual void deleteRenderbuffer(WebGLId) {
last_call_was_set_visibility_ = false;
}
- virtual void discardBackbufferCHROMIUM() {
- last_call_was_set_visibility_ = false;
- }
virtual void ensureBackbufferCHROMIUM() {
last_call_was_set_visibility_ = false;
}
@@ -1714,7 +1711,6 @@ class OutputSurfaceMockContext : public TestWebGraphicsContext3D {
// framebuffer-related GL calls directly. Instead these are supposed to go
// through the OutputSurface abstraction.
MOCK_METHOD0(ensureBackbufferCHROMIUM, void());
- MOCK_METHOD0(discardBackbufferCHROMIUM, void());
MOCK_METHOD2(bindFramebuffer, void(WGC3Denum target, WebGLId framebuffer));
MOCK_METHOD3(reshapeWithScaleFactor,
void(int width, int height, float scale_factor));
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index f63ff29..ba0a96e 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -23,6 +23,7 @@
#include "cc/scheduler/delay_based_time_source.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/context_support.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/khronos/GLES2/gl2ext.h"
@@ -352,7 +353,7 @@ void OutputSurface::EnsureBackbuffer() {
void OutputSurface::DiscardBackbuffer() {
if (context_provider_)
- context_provider_->Context3d()->discardBackbufferCHROMIUM();
+ context_provider_->ContextGL()->DiscardBackbufferCHROMIUM();
if (software_device_)
software_device_->DiscardBackbuffer();
}