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

Unified Diff: cc/output/output_surface.cc

Issue 502203003: Remove implicit conversions from scoped_refptr to T* in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use .get() instead of rewriting local variable Created 6 years, 4 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/output/delegating_renderer.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index a19a83ef2c4226f11723a8ce69dde5281183d16b..39b2f4ce1c02bca3cc9b50fdb6400d80c099e4de 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -117,7 +117,7 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
client_ = client;
bool success = true;
- if (context_provider_) {
+ if (context_provider_.get()) {
success = context_provider_->BindToCurrentThread();
if (success)
SetUpContext3d();
@@ -131,8 +131,8 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
bool OutputSurface::InitializeAndSetContext3d(
scoped_refptr<ContextProvider> context_provider) {
- DCHECK(!context_provider_);
- DCHECK(context_provider);
+ DCHECK(!context_provider_.get());
+ DCHECK(context_provider.get());
DCHECK(client_);
bool success = false;
@@ -151,13 +151,13 @@ bool OutputSurface::InitializeAndSetContext3d(
void OutputSurface::ReleaseGL() {
DCHECK(client_);
- DCHECK(context_provider_);
+ DCHECK(context_provider_.get());
client_->ReleaseGL();
- DCHECK(!context_provider_);
+ DCHECK(!context_provider_.get());
}
void OutputSurface::SetUpContext3d() {
- DCHECK(context_provider_);
+ DCHECK(context_provider_.get());
DCHECK(client_);
context_provider_->SetLostContextCallback(
@@ -173,7 +173,7 @@ void OutputSurface::SetUpContext3d() {
void OutputSurface::ReleaseContextProvider() {
DCHECK(client_);
- DCHECK(context_provider_);
+ DCHECK(context_provider_.get());
ResetContext3d();
}
@@ -195,7 +195,7 @@ void OutputSurface::EnsureBackbuffer() {
}
void OutputSurface::DiscardBackbuffer() {
- if (context_provider_)
+ if (context_provider_.get())
context_provider_->ContextGL()->DiscardBackbufferCHROMIUM();
if (software_device_)
software_device_->DiscardBackbuffer();
@@ -207,7 +207,7 @@ void OutputSurface::Reshape(const gfx::Size& size, float scale_factor) {
surface_size_ = size;
device_scale_factor_ = scale_factor;
- if (context_provider_) {
+ if (context_provider_.get()) {
context_provider_->ContextGL()->ResizeCHROMIUM(
size.width(), size.height(), scale_factor);
}
@@ -220,7 +220,7 @@ gfx::Size OutputSurface::SurfaceSize() const {
}
void OutputSurface::BindFramebuffer() {
- DCHECK(context_provider_);
+ DCHECK(context_provider_.get());
context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
}
@@ -231,7 +231,7 @@ void OutputSurface::SwapBuffers(CompositorFrame* frame) {
return;
}
- DCHECK(context_provider_);
+ DCHECK(context_provider_.get());
DCHECK(frame->gl_frame_data);
if (frame->gl_frame_data->sub_buffer_rect ==
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698