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

Side by Side Diff: cc/output/output_surface.cc

Issue 1474873003: Add alpha argument to glResizeCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | cc/test/test_gles2_interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 software_device_->DiscardBackbuffer(); 250 software_device_->DiscardBackbuffer();
251 } 251 }
252 252
253 void OutputSurface::Reshape(const gfx::Size& size, float scale_factor) { 253 void OutputSurface::Reshape(const gfx::Size& size, float scale_factor) {
254 if (size == surface_size_ && scale_factor == device_scale_factor_) 254 if (size == surface_size_ && scale_factor == device_scale_factor_)
255 return; 255 return;
256 256
257 surface_size_ = size; 257 surface_size_ = size;
258 device_scale_factor_ = scale_factor; 258 device_scale_factor_ = scale_factor;
259 if (context_provider_.get()) { 259 if (context_provider_.get()) {
260 context_provider_->ContextGL()->ResizeCHROMIUM( 260 context_provider_->ContextGL()->ResizeCHROMIUM(size.width(), size.height(),
261 size.width(), size.height(), scale_factor); 261 scale_factor, GL_TRUE);
262 } 262 }
263 if (software_device_) 263 if (software_device_)
264 software_device_->Resize(size, scale_factor); 264 software_device_->Resize(size, scale_factor);
265 } 265 }
266 266
267 void OutputSurface::BindFramebuffer() { 267 void OutputSurface::BindFramebuffer() {
268 DCHECK(context_provider_.get()); 268 DCHECK(context_provider_.get());
269 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 269 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
270 } 270 }
271 271
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 if (context_provider_.get()) { 361 if (context_provider_.get()) {
362 context_provider_->SetLostContextCallback( 362 context_provider_->SetLostContextCallback(
363 ContextProvider::LostContextCallback()); 363 ContextProvider::LostContextCallback());
364 } 364 }
365 context_provider_ = nullptr; 365 context_provider_ = nullptr;
366 client_ = nullptr; 366 client_ = nullptr;
367 weak_ptr_factory_.InvalidateWeakPtrs(); 367 weak_ptr_factory_.InvalidateWeakPtrs();
368 } 368 }
369 369
370 } // namespace cc 370 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/test_gles2_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698